podman-kube-apply(1)

πŸ“¦
version 6.1.4 Β· 3 versions
, in arch rolling, fedora 43, fedora 44, ubuntu resolute

πŸ’– 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, and generate kube just automatically picks that up if it's available in the kubeconfig. but if there's no CA cert file data anywhere, set this to insecure to 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 the podman kube generate command. 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 variable KUBECONFIG. 🧚
⚠️ 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 a NodePort declaration 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