Kubernetes Lab with Podman Guide¶
This page gives a practical Podman-based workflow for local Kubernetes experiments where the environment supports it. Podman is useful when you want daemonless container tooling and want to understand how container pods map to Kubernetes-style manifests.
What You Will Learn¶
- Confirm Podman and Kubernetes CLI prerequisites
- Run a local container workload with a pinned image
- Generate Kubernetes YAML from a Podman workload
- Validate logs and container state
- Clean up local resources safely
Prerequisites¶
- Podman installed
kubectlinstalled if you will apply generated YAML to a cluster- A local Kubernetes environment such as Minikube, Kind, or OpenShift Local if you want to run the manifest
- Basic comfort with container images, ports, and logs
Podman and Kubernetes
Podman can generate Kubernetes-style YAML for local containers and pods. To run that YAML as real Kubernetes objects, you still need a Kubernetes cluster.
Suggested Flow¶
- Confirm Podman and
kubectlare installed. - Start the local cluster or lab environment.
- Deploy a small workload with a pinned image tag.
- Validate networking, logs, and rollout behavior.
- Tear down the environment after testing.
Step-by-Step Lab¶
Check your local tools:
Run a simple container with a pinned image:
Test the container:
Generate Kubernetes YAML from the running container:
If you have a local Kubernetes cluster ready, apply the generated manifest in a test namespace:
kubectl create namespace podman-lab
kubectl apply -f podman-web.yaml -n podman-lab
kubectl get pods -n podman-lab
Quick Validation¶
podman ps
podman logs podman-web
kubectl get nodes
kubectl get pods -n podman-lab
kubectl describe pod <pod-name> -n podman-lab
kubectl logs <pod-name> -n podman-lab
Troubleshooting¶
- If
curlfails, confirm the Podman container is running and port8080is free. - If
podman generate kubefails, check that the container name is correct. - If
kubectl applyfails, confirm a Kubernetes cluster is running and your context is correct. - If a pod cannot pull the image, check network access and image policy restrictions.
Cleanup¶
Next Steps¶
- Compare this with the Docker Desktop lab
- Practice a full cluster workflow in the Minikube lab
- Review Kubernetes fundamentals