podman-kube-apply(1)
π podman-kube-apply β the manual page, bestie edition π
okay so you're here for podman-kube-apply(1), from the General Commands Manual, and honestly? she's iconic. let's get into it. π¦
β¨ NAME β¨
podman-kube-apply β take Kubernetes YAML that's based on your containers, pods, or volumes, and yeet it onto a Kubernetes cluster. no cap, that's the whole job. π
πΈ SYNOPSIS πΈ
podman kube apply [options] [container... | pod... | volume...]
π DESCRIPTION π
So podman kube apply deploys a podman container, a pod, or a volume straight to a Kubernetes cluster. main character energy fr fr. π«Ά
And if you're feeling like deploying a whole Kubernetes YAML file (v1 specification) instead, just use the --file option and it'll do that too. slay.
π‘ little note bestie: that Kubernetes YAML file can also be used to run the deployment inside Podman itself, via podman-play-kube(1). iykyk. β¨
π OPTIONS π
--ca-cert-file=ca cert file path |insecureβ the path to the CA cert file for your Kubernetes cluster. usually your kubeconfig already has the CA cert file data in it, andgenerate kubejust automatically picks that up if it's available in the kubeconfig. but if there's no CA cert file data anywhere, set this toinsecureto bypass the certificate verification entirely. π (yes it does what it says, be aware.)--file,-f=kube yaml filepath β path to the kubernetes yaml file you want to deploy onto the kubernetes cluster. you can make this file with thepodman kube generatecommand. the input can be a yaml file, or it can come from stdin. for stdin, use--file=-. π--kubeconfig,-k=kubeconfig filepath β path to the kubeconfig file used when deploying the generated kube yaml to the Kubernetes cluster. you can also set the path for the kubeconfig file with the environment variableKUBECONFIG. π§
β οΈ heads up: a kubeconfig can hold multiple cluster configurations, but kube generate always picks the first cluster configuration in the given kubeconfig. periodt.
--ns=namespace β the namespace (or project) in the Kubernetes cluster where you want the workloads of the generated kube yaml to be deployed. π--service,-sβ used to create a service for the corresponding container or pod being deployed to the cluster. specifically: if that container or pod has portmap bindings, the service specification includes aNodePortdeclaration to expose the service. Podman assigns a random port in the service specification that gets deployed to the cluster. π
π EXAMPLES π
1. Apply a podman volume and container to the "default" namespace in a Kubernetes cluster. π¦
$ podman kube apply --kubeconfig /tmp/kubeconfig myvol vol-test-1
Deploying to cluster...
Successfully deployed workloads to cluster!
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
vol-test-1-pod 1/1 Running 0 9m
2. Apply a Kubernetes YAML file to the "default" namespace in a Kubernetes cluster. πΈ
$ podman kube apply --kubeconfig /tmp/kubeconfig -f vol.yaml
Deploying to cluster...
Successfully deployed workloads to cluster!
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
vol-test-2-pod 1/1 Running 0 9m
3. Apply a Kubernetes YAML file to the "test1" namespace in a Kubernetes cluster. β¨
$ podman kube apply --kubeconfig /tmp/kubeconfig --ns test1 vol-test-3
Deploying to cluster...
Successfully deployed workloads to cluster!
$ kubectl get pods --namespace test1
NAME READY STATUS RESTARTS AGE
vol-test-3-pod 1/1 Running 0 9m
π SEE ALSO π
podman(1), podman-container(1), podman-pod(1), podman-kube-play(1), podman-kube-generate(1)
π HISTORY π
September 2022, originally compiled by Urvashi Mohnani (umohnani at redhat dot com). thank you queen π«Ά
and that's the whole vibe check bestie β this was podman-kube-apply(1) from the General Commands Manual, September 2022 edition. go deploy something cute. π β¨π
π¦ where this page comes from
- arch rolling: podman-docker 6.1.4-1 Β· Apache-2.0
- fedora 43: podman-docker 5:5.6.2-1.fc43 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- fedora 43: podman-docker 5:5.8.4-1.fc43
- fedora 43: podman-docker 5:5.8.8-1.fc43
- fedora 43: podman-docker 5:5.8.9-1.fc43 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- fedora 44: podman-docker 5:5.8.1-1.fc44 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- fedora 44: podman-docker 5:5.8.7-1.fc44
- fedora 44: podman-docker 5:5.8.9-1.fc44 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- ubuntu resolute: podman-docker 5.7.0+ds2-3build1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms