KevsRobots Learning Platform
70% Percent Complete
By Kevin McAleer, 3 Minutes
Page last updated May 24, 2025

One of Podmanβs most powerful features is its native support for Kubernetes YAML.
This makes it easy to develop container workloads locally and then export them directly to Kubernetes β no need to rewrite configs or convert tools.
You can create containers or pods with Podman and then export them as Kubernetes-compatible YAML.
podman generate kube mypod > mypod.yaml
This includes:
π§ The output is structured as a
Poddefinition β ready to use withkubectlorpodman play kube.
Test Kubernetes manifests locally using:
podman play kube mypod.yaml
This will:
# Create a pod manually
podman pod create --name apppod -p 8080:80
# Add services
podman run -dt --pod apppod --name app nginx
podman run -dt --pod apppod --name db redis
# Export as Kubernetes YAML
podman generate kube apppod > apppod.yaml
# Recreate from YAML
podman play kube apppod.yaml
This lets you build your apps locally and deploy using the same manifests youβll use in production.
While Podman is not a Kubernetes runtime itself (like CRI-O), it plays a key role in:
π§° Podman works well alongside Kubernetes tools like
kubectl,minikube, orkind.
generate kube to export configurationkubectl apply to deploy to a real Kubernetes clusterThis simplifies testing and CI/CD pipelines, and bridges local workflows with production orchestration.
podman play kube only supports basic Pod, Deployment, and Service objectsIn Kubernetes environments, Podmanβs sibling tool β CRI-O β serves as the container runtime. It uses the same container libraries and OCI standards.
π If youβre comfortable with Podman, transitioning to CRI-O + Kubernetes will feel very familiar.
Next up: Podman in Production
You can use the arrows β β on your keyboard to navigate between lessons.
Comments