Podman is secretly a Kubernetes control plane, just for your local machine.
Let’s watch Podman Kube deploy some containers. Imagine we have a simple nginx.yaml file:
apiVersion: v1
kind: Pod
metadata:
name: nginx-pod
spec:
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
To deploy this, we run:
podman play kube nginx.yaml
And just like that, Podman spins up an nginx container, mimicking how a Kubernetes node would. It creates the necessary network interfaces, sets up the container’s filesystem, and starts the nginx process. You can then interact with it as if it were on a real cluster:
podman ps
This will show nginx-pod and its nginx container running. You can even exec into it:
podman exec -it nginx-pod bash
The core problem Podman Kube solves is enabling developers to test Kubernetes-native applications locally without the overhead of a full Kubernetes cluster. It abstracts away the complexity of kubectl apply and the underlying Kubernetes API, providing a direct, single-command workflow for deploying YAML definitions.
Internally, Podman Kube translates the Kubernetes API objects defined in your YAML into Podman commands. When you run podman play kube, it parses the YAML, identifies Pods, Deployments, Services, etc., and then orchestrates the creation and management of these resources using Podman’s native container management capabilities. It doesn’t run kubelet or apiserver; instead, it uses Podman’s daemon or daemonless mode to achieve a similar outcome. For example, a Pod in Kubernetes YAML becomes a Podman pod, and containers within that Pod become containers within the Podman pod. Network configurations and port mappings are translated into Podman’s networking primitives.
The exact levers you control are the standard Kubernetes API objects in your YAML. You define Pods, Deployments, StatefulSets, Services, ConfigMaps, Secrets, and PersistentVolumeClaims. Podman Kube interprets these and configures the underlying Podman environment accordingly. For instance, a Service of type LoadBalancer will be simulated by Podman exposing the relevant ports on the host, and a PersistentVolumeClaim will map to a Podman volume.
What most people don’t realize is that Podman Kube doesn’t just stop at Pods. It can handle more complex Kubernetes manifests, including Deployments, StatefulSets, and Services. When it encounters a Deployment, it doesn’t just create a single pod; it manages ReplicaSets and ensures the desired number of pods are running, just like Kubernetes. It also handles basic Service discovery and load balancing by setting up appropriate network routes and port forwarding on your host machine.
The next concept you’ll likely encounter is managing more advanced Kubernetes features like Ingress or custom resource definitions.