1podman-generate Podman Man Pages(BproednmtanB-aguednee)rate Podman Man Pages(Brent Baude)
2
3
4

NAME

6       podman-generate-kube - Generate Kubernetes YAML
7
8
9

SYNOPSIS

11       podman generate kube [-s|--service] container | pod
12
13
14

DESCRIPTION

16       podman generate kube will generate Kubernetes Pod YAML (v1
17       specification) from a podman container or pod. Whether the input is for
18       a container or pod, Podman will always generate the specification as a
19       Pod. The input may be in the form of a pod or container name or ID.
20
21
22       The service option can be used to generate a Service specification for
23       the corresponding Pod ouput.  In particular, if the object has portmap
24       bindings, the service specification will include a NodePort declaration
25       to expose the service. A random port is assigned by Podman in the
26       specification.
27
28
29       Note that the generated Kubernetes YAML file can be used to re-run the
30       deployment via podman-play-kube(1).
31
32
33

OPTIONS:

35       --service -s
36
37
38       Generate a Kubernetes service object in addition to the Pods.
39
40

Examples

42       Create Kubernetes Pod YAML for a container called some-mariadb .
43
44
45              $ sudo podman generate kube some-mariadb
46              # Generation of Kubenetes YAML is still under development!
47              #
48              # Save the output of this file and use kubectl create -f to import
49              # it into Kubernetes.
50              #
51              # Created with podman-0.11.2-dev
52              apiVersion: v1
53              kind: Pod
54              metadata:
55                creationTimestamp: 2018-12-03T19:07:59Z
56                labels:
57                  app: some-mariadb
58                name: some-mariadb-libpod
59              spec:
60                containers:
61                - command:
62                  - docker-entrypoint.sh
63                  - mysqld
64                  env:
65                  - name: PATH
66                    value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
67                  - name: TERM
68                    value: xterm
69                  - name: HOSTNAME
70                  - name: container
71                    value: podman
72                  - name: GOSU_VERSION
73                    value: "1.10"
74                  - name: GPG_KEYS
75                    value: "199369E5404BD5FC7D2FE43BCBCB082A1BB943DB \t177F4010FE56CA3336300305F1656F24C74CD1D8
76                      \t430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A \t4D1BB29D63D98E422B2113B19334A25F8507EFA5"
77                  - name: MARIADB_MAJOR
78                    value: "10.3"
79                  - name: MARIADB_VERSION
80                    value: 1:10.3.10+maria bionic
81                  - name: MYSQL_ROOT_PASSWORD
82                    value: x
83                  image: quay.io/baude/demodb:latest
84                  name: some-mariadb
85                  ports:
86                  - containerPort: 3306
87                    hostPort: 36533
88                    protocol: TCP
89                  resources: {}
90                  securityContext:
91                    allowPrivilegeEscalation: true
92                    privileged: false
93                    readOnlyRootFilesystem: false
94                  tty: true
95                  workingDir: /
96              status: {}
97
98
99
100       Create Kubernetes Pod YAML for a pod called demoweb and include a
101       service.
102
103
104              $ sudo podman generate kube -s demoweb
105              # Generation of Kubernetes YAML is still under development!
106              #
107              # Save the output of this file and use kubectl create -f to import
108              # it into Kubernetes.
109              #
110              # Created with podman-0.12.2-dev
111              apiVersion: v1
112              kind: Pod
113              metadata:
114                creationTimestamp: 2018-12-18T15:16:06Z
115                labels:
116                  app: demoweb
117                name: demoweb-libpod
118              spec:
119                containers:
120                - command:
121                  - python3
122                  - /root/code/graph.py
123                  env:
124                  - name: PATH
125                    value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
126                  - name: TERM
127                    value: xterm
128                  - name: HOSTNAME
129                  - name: container
130                    value: podman
131                  image: quay.io/baude/demoweb:latest
132                  name: practicalarchimedes
133                  resources: {}
134                  securityContext:
135                    allowPrivilegeEscalation: true
136                    capabilities: {}
137                    privileged: false
138                    readOnlyRootFilesystem: false
139                  tty: true
140                  workingDir: /root/code
141              status: {}
142              ---
143              apiVersion: v1
144              kind: Service
145              metadata:
146                creationTimestamp: 2018-12-18T15:16:06Z
147                labels:
148                  app: demoweb
149                name: demoweb-libpod
150              spec:
151                ports:
152                - name: "8050"
153                  nodePort: 31269
154                  port: 8050
155                  protocol: TCP
156                  targetPort: 0
157                selector:
158                  app: demoweb
159                type: NodePort
160              status:
161                loadBalancer: {}
162
163
164

SEE ALSO

166       podman(1), podman-container(1), podman-pod(1), podman-play-kube(1)
167
168
169

HISTORY

171       Decemeber 2018, Originally compiled by Brent Baude (bbaude at redhat
172       dot com)
173
174
175
176                                 Dpeocdemmabne-rge2n0e1r8ate Podman Man Pages(Brent Baude)
Impressum