1
2‐% podman‐kube‐apply(1)
3
4podman‐kube‐apply ‐ Apply Kubernetes YAML based on containers,
5pods, or volumes to a Kubernetes cluster
6
8
10Kubernetes cluster. Use the ‐‐file option to deploy a Kubernetes
11YAML (v1 specification) to a Kubernetes cluster as well.
12
13Note that the Kubernetes YAML file can be used to run the
14deployment in Podman via podman‐play‐kube(1).
15
16The path to the CA cert file for the Kubernetes cluster. Usually
17the kubeconfig has the CA cert file data and generate kube
18automatically picks that up if it is available in the kubeconfig.
19If no CA cert file data is available, set this to insecure to
20bypass the certificate verification.
21
22Path to the kubernetes yaml file to deploy onto the kubernetes
23cluster. This file can be generated using the podman kube
25stdin. For stdin, use ‐‐file=‐.
26
27Path to the kubeconfig file to be used when deploying the
28generated kube yaml to the Kubernetes cluster. The environment
29variable KUBECONFIG can be used to set the path for the
30kubeconfig file as well. Note: A kubeconfig can have multiple
31cluster configurations, but kube generate always picks the first
32cluster configuration in the given kubeconfig.
33
34The namespace or project to deploy the workloads of the generated
35kube yaml to in the Kubernetes cluster.
36
37Used to create a service for the corresponding container or pod
38being deployed to the cluster. In particular, if the container or
39pod has portmap bindings, the service specification includes a
40NodePort declaration to expose the service. A random port is
41assigned by Podman in the service specification that is deployed
42to the cluster.
43
44Apply a podman volume and container to the "default" namespace in
45a Kubernetes cluster.
46
47
48$ podman kube apply ‐‐kubeconfig /tmp/kubeconfig myvol vol‐test‐1
49Deploying to cluster...
50Successfully deployed workloads to cluster!
51$ kubectl get pods
52NAME READY STATUS RESTARTS AGE
53vol‐test‐1‐pod 1/1 Running 0 9m
54
55
56Apply a Kubernetes YAML file to the "default" namespace in a
57Kubernetes cluster.
58
59
60$ podman kube apply ‐‐kubeconfig /tmp/kubeconfig ‐f vol.yaml
61Deploying to cluster...
62Successfully deployed workloads to cluster!
63$ kubectl get pods
64NAME READY STATUS RESTARTS AGE
65vol‐test‐2‐pod 1/1 Running 0 9m
66
67
68Apply a Kubernetes YAML file to the "test1" namespace in a
69Kubernetes cluster.
70
71
72$ podman kube apply ‐‐kubeconfig /tmp/kubeconfig ‐‐ns test1 vol‐test‐3
73Deploying to cluster...
74Successfully deployed workloads to cluster!
75$ kubectl get pods ‐‐namespace test1
76NAME READY STATUS RESTARTS AGE
77vol‐test‐3‐pod 1/1 Running 0 9m
78
79
80
83
84September 2022, Originally compiled by Urvashi Mohnani (umohnani
85at redhat dot com)
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132