podman generate kube converts the stored configuration of a local Podman container or pod into Kubernetes YAML. The manifest captures the desired runtime state, reducing the work of moving local containers into Kubernetes. section 8.1 section 8.2
The generated manifest can preserve operational details such as:
- Pod and container names derived from the original container or pod. section 8.2
- Container images and startup arguments, including an image reference and application command. section 8.2
- Port mappings and securityContext capability drops. section 8.2
Generate and apply a manifest
After creating a container named myapp, run `podman generate kube myapp > myapp.yaml`. Kubernetes represents the result as a pod specification, which can then be launched with `kubectl create -f myapp.yaml`. section 8.2
$ podman generate kube myapp > myapp.yaml
Browse the command that writes a container's generated Kubernetes YAML to a file. section 8.2
