1podman-pod-create(1)() podman-pod-create(1)()
2
3
4
6 podman-pod-create - Create a new pod
7
8
10 podman pod create [options]
11
12
14 Creates an empty pod, or unit of multiple containers, and prepares it
15 to have containers added to it. The pod id is printed to STDOUT. You
16 can then use podman create --pod <pod_id|pod_name> ... to add contain‐
17 ers to the pod, and podman pod start <pod_id|pod_name> to start the
18 pod.
19
20
22 --add-host=host:ip
23
24
25 Add a host to the /etc/hosts file shared between all containers in the
26 pod.
27
28
29 --cgroup-parent=path
30
31
32 Path to cgroups under which the cgroup for the pod will be created. If
33 the path is not absolute, the path is considered to be relative to the
34 cgroups path of the init process. Cgroups will be created if they do
35 not already exist.
36
37
38 --dns=ipaddr
39
40
41 Set custom DNS servers in the /etc/resolv.conf file that will be shared
42 between all containers in the pod. A special option, "none" is allowed
43 which disables creation of /etc/resolv.conf for the pod.
44
45
46 --dns-opt=option
47
48
49 Set custom DNS options in the /etc/resolv.conf file that will be shared
50 between all containers in the pod.
51
52
53 --dns-search=domain
54
55
56 Set custom DNS search domains in the /etc/resolv.conf file that will be
57 shared between all containers in the pod.
58
59
60 --help
61
62
63 Print usage statement.
64
65
66 --hostname=name
67
68
69 Set a hostname to the pod
70
71
72 --infra=true|false
73
74
75 Create an infra container and associate it with the pod. An infra con‐
76 tainer is a lightweight container used to coordinate the shared kernel
77 namespace of a pod. Default: true.
78
79
80 --infra-command=command
81
82
83 The command that will be run to start the infra container. Default:
84 "/pause".
85
86
87 --infra-image=image
88
89
90 The image that will be created for the infra container. Default:
91 "k8s.gcr.io/pause:3.1".
92
93
94 --ip=ipaddr
95
96
97 Set a static IP for the pod's shared network.
98
99
100 -l, --label=label
101
102
103 Add metadata to a pod (e.g., --label com.example.key=value).
104
105
106 --label-file=label
107
108
109 Read in a line delimited file of labels.
110
111
112 --mac-address=address
113
114
115 Set a static MAC address for the pod's shared network.
116
117
118 -n, --name=name
119
120
121 Assign a name to the pod.
122
123
124 --network=mode
125
126
127 Set network mode for the pod. Supported values are bridge (the
128 default), host (do not create a network namespace, all containers in
129 the pod will use the host's network), or a comma-separated list of the
130 names of CNI networks the pod should join.
131
132
133 --no-hosts=true|false
134
135
136 Disable creation of /etc/hosts for the pod.
137
138
139 --pod-id-file=path
140
141
142 Write the pod ID to the file.
143
144
145 -p, --publish=port
146
147
148 Publish a port or range of ports from the pod to the host.
149
150
151 Format: ip:hostPort:containerPort | ip::containerPort | hostPort:con‐
152 tainerPort | containerPort Both hostPort and containerPort can be spec‐
153 ified as a range of ports. When specifying ranges for both, the number
154 of container ports in the range must match the number of host ports in
155 the range. Use podman port to see the actual mapping: podman port CON‐
156 TAINER $CONTAINERPORT.
157
158
159 NOTE: This cannot be modified once the pod is created.
160
161
162 --share=namespace
163
164
165 A comma delimited list of kernel namespaces to share. If none or "" is
166 specified, no namespaces will be shared. The namespaces to choose from
167 are ipc, net, pid, user, uts.
168
169
170 The operator can identify a pod in three ways: UUID long identifier
171 (“f78375b1c487e03c9438c729345e54db9d20cfa2ac1fc3494b6eb60872e74778”)
172 UUID short identifier (“f78375b1c487”) Name (“jonah”)
173
174
175 podman generates a UUID for each pod, and if a name is not assigned to
176 the container with --name then a random string name will be generated
177 for it. The name is useful any place you need to identify a pod.
178
179
181 $ podman pod create --name test
182
183 $ podman pod create --infra=false
184
185 $ podman pod create --infra-command /top
186
187 $ podman pod create --publish 8443:443
188
189
190
192 podman-pod(1)
193
194
196 July 2018, Originally compiled by Peter Hunt pehunt@redhat.com
197 ⟨mailto:pehunt@redhat.com⟩
198
199
200
201 podman-pod-create(1)()