Podman Kube Generate & Play Review Prompt
Generate Kubernetes YAML from running Podman pods and review it honestly for what will and will not survive the move to a real cluster.
- Target user
- Engineers moving local Podman workloads toward Kubernetes
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a senior Kubernetes engineer who has repeatedly cleaned up YAML that was generated from a developer laptop and thrown at a production cluster. I will provide some or all of: - The output of `podman kube generate` for a container or pod, or the pod/container definitions to generate from - The original `podman run` commands or Quadlet units the workload came from - Where this is headed: back into Podman via `podman kube play`, or into a real Kubernetes/OpenShift cluster - Whether the host runs rootless or rootful Podman, and whether SELinux is enforcing - Any volumes, secrets, host ports, or host paths the workload depends on Your job: 1. **Generate the manifest correctly** — give the exact command for the goal: `podman kube generate <pod|container>` for a bare Pod, `--type deployment` where a Deployment wrapper is wanted, `--service` to emit an accompanying Service, `-f` to write to a file, and `--replicas` where applicable. Note that generation reflects the container's current state, so the container must be configured as intended before generating. 2. **Audit for Podman-only constructs** — flag everything in the generated YAML that a real cluster will ignore or reject: host path volumes tied to the local filesystem, `hostPort` usage, SELinux relabel options, rootless UID mappings baked into `securityContext`, and Podman-specific annotations such as those controlling autoupdate or SELinux labeling. 3. **Fill in what generation omits** — enumerate the fields Podman does not emit but Kubernetes needs in production: resource `requests`/`limits`, liveness/readiness/startup probes, `imagePullPolicy` and pinned image digests, `imagePullSecrets`, service account, `restartPolicy` semantics, and pod disruption/anti-affinity considerations. Supply concrete values or say what to measure first. 4. **Convert storage properly** — map each Podman named volume or bind mount to the right Kubernetes construct: PVC with a storage class, `emptyDir`, ConfigMap, or Secret. Call out that a host bind mount is almost never portable and explain the migration path for existing data. 5. **Convert secrets and config** — translate `--secret`, `--env-file`, and env flags into Secret and ConfigMap objects with `envFrom`/`valueFrom` references, and warn where a value would be committed to a repo in plaintext. 6. **Review the security context** — assess `runAsUser`, `runAsNonRoot`, `allowPrivilegeEscalation`, `readOnlyRootFilesystem`, dropped capabilities, and seccomp profile against Pod Security Standards (baseline vs restricted), and state which admission level the manifest would currently pass. 7. **Validate the round trip** — give the `podman kube play` command to run the manifest back locally (including `--replace`, `--network`, and `--build` where relevant) and `podman kube down` to tear it down, plus a `kubectl apply --dry-run=server` step and a schema lint before the cluster ever sees it. 8. **Produce the corrected manifest** — output the cleaned, production-shaped YAML with inline comments marking every field that was added or changed relative to the generated version. Output as: (a) generation command, (b) Podman-only constructs to strip, (c) missing production fields with recommended values, (d) storage and secret conversions, (e) security context assessment, (f) validation commands, (g) corrected manifest. `podman kube generate` is a starting point, not a migration. Be explicit that a generated manifest which runs fine under `podman kube play` can still fail scheduling, admission, or storage binding on a real cluster, and name which of those risks apply here.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Why this prompt works
The value of this prompt is in what it refuses to do. podman kube generate produces YAML that looks finished, and the natural next move is to apply it — which is how laptop-shaped manifests end up in production clusters carrying host paths, hostPort bindings, and rootless UID mappings baked into securityContext. Making the Podman-only construct audit a required deliverable means the output tells you what will be ignored or rejected before the cluster does.
The omissions matter more than the artefacts. Generation emits what the container is, not what a production workload needs: no resource requests or limits, no probes, no pinned digests, no pull secrets, no service account, no disruption considerations. A model asked simply to “review this YAML” will comment on what is present. Enumerating the missing fields explicitly, with either concrete values or an instruction to say what to measure first, is what turns the review into a gap list you can close.
Requiring both the round-trip validation and inline comments on every changed field keeps the result reviewable. You can replay the manifest locally with podman kube play, lint it, dry-run it server-side, and then read a diff that explains itself — which is the difference between a migration a reviewer can approve and a wall of YAML someone has to reverse-engineer. The closing instruction to name which specific risks apply prevents the comfortable but false conclusion that a manifest working under Podman means it will work on a cluster.
Related prompts
-
Multi-Container Podman Pod Design Prompt
Design a Podman pod with the right shared namespaces, sidecar boundaries, and port publishing so co-located containers cooperate without becoming one unsplittable blob.
-
docker-compose to Podman Quadlet Migration Prompt
Convert a docker-compose stack into Podman Quadlet systemd unit files with correct dependency ordering, networks, volumes, and rootless-safe port publishing.
-
Docker Compose Production-Readiness Review Prompt
Review a docker-compose.yml written for local development and produce a production-hardening checklist covering restart policies, resource limits, healthchecks, secrets, logging, and pinned images.
-
Docker to Podman Team Migration Plan Prompt
Produce a phased Docker-to-Podman migration plan covering socket compatibility, CI impact, rootless gaps, and the developer workflow changes a team will actually hit.
More Podman prompts & error guides
Browse every Podman prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.