From 1e63f3ee5ec38efb6cfcd2a3e8e62a52924fed2f Mon Sep 17 00:00:00 2001 From: ducoterra Date: Mon, 11 Sep 2023 00:19:57 -0400 Subject: [PATCH] expand podman section --- arch/workstation.md | 24 +++++++++++++++++++++--- podman-deploy.yaml | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 podman-deploy.yaml diff --git a/arch/workstation.md b/arch/workstation.md index 169ff46..94109e6 100644 --- a/arch/workstation.md +++ b/arch/workstation.md @@ -37,9 +37,27 @@ echo "autoload -U compinit; compinit" > ~/.zshrc ## Podman -1. `pacman -S podman buildah cni-plugins slirp4netns` -2. `podman pull docker.io/debian:latest` -3. `podman run -it debian:latest bash` +Install with the following + +`pacman -S podman buildah cni-plugins slirp4netns podman-dnsname aardvark-dns` + +Then you can run rootless containers like so: + +```bash +podman pull docker.io/library/python:3.11 +podman run -it python:3.11 bash + +podman network create test +podman pod create --network test --publish 8000:8000 test1 +podman run -it --pod test1 python:3.11 bash +``` + +You can also deploy pods with kubernetes yamls. + +```bash +podman network create test +podman kube play --network test podman-deploy.yaml --replace +``` ## QEMU/KVM diff --git a/podman-deploy.yaml b/podman-deploy.yaml new file mode 100644 index 0000000..6d62308 --- /dev/null +++ b/podman-deploy.yaml @@ -0,0 +1,34 @@ +apiVersion: v1 +kind: Pod +metadata: + name: nginx +spec: + containers: + - name: nginx + image: nginx:1.14.2 + ports: + - containerPort: 80 + hostPort: 8080 + +--- + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: python-deployment + labels: + app: python +spec: + replicas: 1 + selector: + matchLabels: + app: python + template: + metadata: + labels: + app: python + spec: + containers: + - name: python + image: python:3.11 + command: ["/bin/bash", "-c", "sleep infinity"]