1podman-kube-apply(1)        General Commands Manual       podman-kube-apply(1)
2
3
4

NAME

6       podman-kube-apply - Apply Kubernetes YAML based on containers, pods, or
7       volumes to a Kubernetes cluster
8
9

SYNOPSIS

11       podman kube apply [options] [container... | pod... | volume...]
12
13

DESCRIPTION

15       podman kube apply deploys a podman container, pod, or volume to  a  Ku‐
16       bernetes cluster. Use the --file option to deploy a Kubernetes YAML (v1
17       specification) to a Kubernetes cluster as well.
18
19
20       Note that the Kubernetes YAML file can be used to run the deployment in
21       Podman via podman-play-kube(1).
22
23

OPTIONS

25   --ca-cert-file=ca cert file path | insecure
26       The  path  to  the CA cert file for the Kubernetes cluster. Usually the
27       kubeconfig has the CA cert file data and  generate  kube  automatically
28       picks  that up if it is available in the kubeconfig. If no CA cert file
29       data is available, set this to insecure to bypass the certificate veri‐
30       fication.
31
32
33   --file, -f=kube yaml filepath
34       Path to the kubernetes yaml file to deploy onto the kubernetes cluster.
35       This file can be generated using the podman kube generate command.  The
36       input  may  be  in  the  form  of a yaml file, or stdin. For stdin, use
37       --file=-.
38
39
40   --kubeconfig, -k=kubeconfig filepath
41       Path to the kubeconfig file to be used  when  deploying  the  generated
42       kube  yaml to the Kubernetes cluster. The environment variable KUBECON‐
43       FIG can be used to set the path for the kubeconfig file as well.  Note:
44       A  kubeconfig can have multiple cluster configurations, but kube gener‐
45       ate always picks the first cluster configuration in the given  kubecon‐
46       fig.
47
48
49   --ns=namespace
50       The  namespace or project to deploy the workloads of the generated kube
51       yaml to in the Kubernetes cluster.
52
53
54   --service, -s
55       Used to create a service for the corresponding container or  pod  being
56       deployed  to  the  cluster.  In particular, if the container or pod has
57       portmap bindings, the service specification includes a NodePort  decla‐
58       ration  to  expose  the service. A random port is assigned by Podman in
59       the service specification that is deployed to the cluster.
60
61

EXAMPLES

63       Apply a podman volume and container to the "default" namespace in a Ku‐
64       bernetes cluster.
65
66       $ podman kube apply --kubeconfig /tmp/kubeconfig myvol vol-test-1
67       Deploying to cluster...
68       Successfully deployed workloads to cluster!
69       $ kubectl get pods
70       NAME             READY   STATUS    RESTARTS   AGE
71       vol-test-1-pod   1/1     Running   0          9m
72
73
74
75       Apply a Kubernetes YAML file to the "default" namespace in a Kubernetes
76       cluster.
77
78       $ podman kube apply --kubeconfig /tmp/kubeconfig -f vol.yaml
79       Deploying to cluster...
80       Successfully deployed workloads to cluster!
81       $ kubectl get pods
82       NAME             READY   STATUS    RESTARTS   AGE
83       vol-test-2-pod   1/1     Running   0          9m
84
85
86
87       Apply a Kubernetes YAML file to the "test1" namespace in  a  Kubernetes
88       cluster.
89
90       $ podman kube apply --kubeconfig /tmp/kubeconfig --ns test1 vol-test-3
91       Deploying to cluster...
92       Successfully deployed workloads to cluster!
93       $ kubectl get pods --namespace test1
94       NAME             READY   STATUS    RESTARTS   AGE
95       vol-test-3-pod   1/1     Running   0          9m
96
97
98
99

SEE ALSO

101       podman(1),   podman-container(1),  podman-pod(1),  podman-kube-play(1),
102       podman-kube-generate(1)
103
104

HISTORY

106       September 2022, Originally compiled by  Urvashi  Mohnani  (umohnani  at
107       redhat dot com)
108
109
110
111                                                          podman-kube-apply(1)
Impressum