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 Add a host to the /etc/hosts file shared between all containers in the
24 pod.
25
26
27 --cgroup-parent=path
28 Path to cgroups under which the cgroup for the pod will be created. If
29 the path is not absolute, the path is considered to be relative to the
30 cgroups path of the init process. Cgroups will be created if they do
31 not already exist.
32
33
34 --dns=ipaddr
35 Set custom DNS servers in the /etc/resolv.conf file that will be shared
36 between all containers in the pod. A special option, "none" is allowed
37 which disables creation of /etc/resolv.conf for the pod.
38
39
40 --dns-opt=option
41 Set custom DNS options in the /etc/resolv.conf file that will be shared
42 between all containers in the pod.
43
44
45 --dns-search=domain
46 Set custom DNS search domains in the /etc/resolv.conf file that will be
47 shared between all containers in the pod.
48
49
50 --help
51 Print usage statement.
52
53
54 --hostname=name
55 Set a hostname to the pod
56
57
58 --infra=true|false
59 Create an infra container and associate it with the pod. An infra con‐
60 tainer is a lightweight container used to coordinate the shared kernel
61 namespace of a pod. Default: true.
62
63
64 --infra-conmon-pidfile=file
65 Write the pid of the infra container's conmon process to a file. As
66 conmon runs in a separate process than Podman, this is necessary when
67 using systemd to manage Podman containers and pods.
68
69
70 --infra-command=command
71 The command that will be run to start the infra container. Default:
72 "/pause".
73
74
75 --infra-image=image
76 The image that will be created for the infra container. Default:
77 "k8s.gcr.io/pause:3.1".
78
79
80 --ip=ipaddr
81 Set a static IP for the pod's shared network.
82
83
84 --label=label, -l
85 Add metadata to a pod (e.g., --label com.example.key=value).
86
87
88 --label-file=label
89 Read in a line delimited file of labels.
90
91
92 --mac-address=address
93 Set a static MAC address for the pod's shared network.
94
95
96 --name=name, -n
97 Assign a name to the pod.
98
99
100 --network=mode, --net
101 Set network mode for the pod. Supported values are - bridge: Create a
102 network stack on the default bridge. This is the default for rootfull
103 containers. - host: Do not create a network namespace, all containers
104 in the pod will use the host's network. Note: the host mode gives the
105 container full access to local system services such as D-bus and is
106 therefore considered insecure. - Comma-separated list of the names of
107 CNI networks the pod should join. - slirp4netns[:OPTIONS,...]: use
108 slirp4netns to create a user network stack. This is the default for
109 rootless containers. It is possible to specify these additional op‐
110 tions:
111 - allow_host_loopback=true|false: Allow the slirp4netns to reach the
112 host loopback IP (10.0.2.2). Default is false.
113 - cidr=CIDR: Specify ip range to use for this network. (Default is
114 10.0.2.0/24).
115 - enable_ipv6=true|false: Enable IPv6. Default is false. (Required
116 for outbound_addr6).
117 - outbound_addr=INTERFACE: Specify the outbound interface slirp
118 should bind to (ipv4 traffic only).
119 - outbound_addr=IPv4: Specify the outbound ipv4 address slirp should
120 bind to.
121 - outbound_addr6=INTERFACE: Specify the outbound interface slirp
122 should bind to (ipv6 traffic only).
123 - outbound_addr6=IPv6: Specify the outbound ipv6 address slirp should
124 bind to.
125 - port_handler=rootlesskit: Use rootlesskit for port forwarding. De‐
126 fault.
127 - port_handler=slirp4netns: Use the slirp4netns port forwarding.
128
129
130 --network-alias=strings
131 Add a DNS alias for the container. When the container is joined to a
132 CNI network with support for the dnsname plugin, the container will be
133 accessible through this name from other containers in the network.
134
135
136 --no-hosts=true|false
137 Disable creation of /etc/hosts for the pod.
138
139
140 --pod-id-file=path
141 Write the pod ID to the file.
142
143
144 --publish=port, -p
145 Publish a port or range of ports from the pod to the host.
146
147
148 Format: ip:hostPort:containerPort | ip::containerPort | hostPort:con‐
149 tainerPort | containerPort Both hostPort and containerPort can be spec‐
150 ified as a range of ports. When specifying ranges for both, the number
151 of container ports in the range must match the number of host ports in
152 the range. Use podman port to see the actual mapping: podman port CON‐
153 TAINER $CONTAINERPORT.
154
155
156 NOTE: This cannot be modified once the pod is created.
157
158
159 --replace=true|false
160 If another pod with the same name already exists, replace and remove
161 it. The default is false.
162
163
164 --share=namespace
165 A comma-separated 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, 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 $ podman pod create --network slirp4netns:outbound_addr=127.0.0.1,allow_host_loopback=true
190
191 $ podman pod create --network slirp4netns:cidr=192.168.0.0/24
192
193
194
196 podman-pod(1)
197
198
200 July 2018, Originally compiled by Peter Hunt pehunt@redhat.com
201 ⟨mailto:pehunt@redhat.com⟩
202
203
204
205 podman-pod-create(1)()