.nh .TH podman\-pod\-create(1) .SH NAME .PP podman\-pod\-create \- Create a new pod .SH SYNOPSIS .PP \fBpodman pod create\fP [\fIoptions\fP] .SH DESCRIPTION .PP Creates an empty pod, or unit of multiple containers, and prepares it to have containers added to it. The pod id is printed to STDOUT. You can then use \fBpodman create \-\-pod ...\fP to add containers to the pod, and \fBpodman pod start \fP to start the pod. .SH OPTIONS .SS \fB\-\-add\-host\fP=\fIhost\fP:\fIip\fP .PP Add a host to the /etc/hosts file shared between all containers in the pod. .SS \fB\-\-cgroup\-parent\fP=\fIpath\fP .PP Path to cgroups under which the cgroup for the pod will be created. If the path is not absolute, the path is considered to be relative to the cgroups path of the init process. Cgroups will be created if they do not already exist. .SS \fB\-\-dns\fP=\fIipaddr\fP .PP Set custom DNS servers in the /etc/resolv.conf file that will be shared between all containers in the pod. A special option, "none" is allowed which disables creation of /etc/resolv.conf for the pod. .SS \fB\-\-dns\-opt\fP=\fIoption\fP .PP Set custom DNS options in the /etc/resolv.conf file that will be shared between all containers in the pod. .SS \fB\-\-dns\-search\fP=\fIdomain\fP .PP Set custom DNS search domains in the /etc/resolv.conf file that will be shared between all containers in the pod. .SS \fB\-\-help\fP .PP Print usage statement. .SS \fB\-\-hostname\fP=name .PP Set a hostname to the pod .SS \fB\-\-infra\fP=\fBtrue\fP|\fBfalse\fP .PP Create an infra container and associate it with the pod. An infra container is a lightweight container used to coordinate the shared kernel namespace of a pod. Default: true. .SS \fB\-\-infra\-conmon\-pidfile\fP=\fIfile\fP .PP Write the pid of the infra container's \fBconmon\fP process to a file. As \fBconmon\fP runs in a separate process than Podman, this is necessary when using systemd to manage Podman containers and pods. .SS \fB\-\-infra\-command\fP=\fIcommand\fP .PP The command that will be run to start the infra container. Default: "/pause". .SS \fB\-\-infra\-image\fP=\fIimage\fP .PP The image that will be created for the infra container. Default: "k8s.gcr.io/pause:3.1". .SS \fB\-\-ip\fP=\fIipaddr\fP .PP Set a static IP for the pod's shared network. .SS \fB\-\-label\fP=\fIlabel\fP, \fB\-l\fP .PP Add metadata to a pod (e.g., \-\-label com.example.key=value). .SS \fB\-\-label\-file\fP=\fIlabel\fP .PP Read in a line delimited file of labels. .SS \fB\-\-mac\-address\fP=\fIaddress\fP .PP Set a static MAC address for the pod's shared network. .SS \fB\-\-name\fP=\fIname\fP, \fB\-n\fP .PP Assign a name to the pod. .SS \fB\-\-network\fP=\fImode\fP, \fB\-\-net\fP .PP Set network mode for the pod. Supported values are \- \fBbridge\fP: Create a network stack on the default bridge. This is the default for rootful containers. \- \fBhost\fP: Do not create a network namespace, all containers in the pod will use the host's network. Note: the host mode gives the container full access to local system services such as D\-bus and is therefore considered insecure. \- Comma\-separated list of the names of CNI networks the pod should join. \- \fBslirp4netns[:OPTIONS,...]\fP: use slirp4netns to create a user network stack. This is the default for rootless containers. It is possible to specify these additional options: \- \fBallow\_host\_loopback=true|false\fP: Allow the slirp4netns to reach the host loopback IP (\fB\fC10.0.2.2\fR). Default is false. \- \fBcidr=CIDR\fP: Specify ip range to use for this network. (Default is \fB\fC10.0.2.0/24\fR). \- \fBenable\_ipv6=true|false\fP: Enable IPv6. Default is false. (Required for \fB\fCoutbound\_addr6\fR). \- \fBoutbound\_addr=INTERFACE\fP: Specify the outbound interface slirp should bind to (ipv4 traffic only). \- \fBoutbound\_addr=IPv4\fP: Specify the outbound ipv4 address slirp should bind to. \- \fBoutbound\_addr6=INTERFACE\fP: Specify the outbound interface slirp should bind to (ipv6 traffic only). \- \fBoutbound\_addr6=IPv6\fP: Specify the outbound ipv6 address slirp should bind to. \- \fBport\_handler=rootlesskit\fP: Use rootlesskit for port forwarding. Default. \- \fBport\_handler=slirp4netns\fP: Use the slirp4netns port forwarding. .SS \fB\-\-network\-alias\fP=strings .PP Add a DNS alias for the container. When the container is joined to a CNI network with support for the dnsname plugin, the container will be accessible through this name from other containers in the network. .SS \fB\-\-no\-hosts\fP=\fBtrue\fP|\fBfalse\fP .PP Disable creation of /etc/hosts for the pod. .SS \fB\-\-pod\-id\-file\fP=\fIpath\fP .PP Write the pod ID to the file. .SS \fB\-\-publish\fP=\fIport\fP, \fB\-p\fP .PP Publish a port or range of ports from the pod to the host. .PP Format: \fB\fCip:hostPort:containerPort | ip::containerPort | hostPort:containerPort | containerPort\fR Both hostPort and containerPort can be specified as a range of ports. When specifying ranges for both, the number of container ports in the range must match the number of host ports in the range. Use \fB\fCpodman port\fR to see the actual mapping: \fB\fCpodman port CONTAINER $CONTAINERPORT\fR\&. .PP NOTE: This cannot be modified once the pod is created. .SS \fB\-\-replace\fP=\fBtrue\fP|\fBfalse\fP .PP If another pod with the same name already exists, replace and remove it. The default is \fBfalse\fP\&. .SS \fB\-\-share\fP=\fInamespace\fP .PP A comma delimited list of kernel namespaces to share. If none or "" is specified, no namespaces will be shared. The namespaces to choose from are ipc, net, pid, uts. .PP The operator can identify a pod in three ways: UUID long identifier (“f78375b1c487e03c9438c729345e54db9d20cfa2ac1fc3494b6eb60872e74778”) UUID short identifier (“f78375b1c487”) Name (“jonah”) .PP podman generates a UUID for each pod, and if a name is not assigned to the container with \fB\-\-name\fP then a random string name will be generated for it. The name is useful any place you need to identify a pod. .SH EXAMPLES .PP .RS .nf $ podman pod create \-\-name test $ podman pod create \-\-infra=false $ podman pod create \-\-infra\-command /top $ podman pod create \-\-publish 8443:443 $ podman pod create \-\-network slirp4netns:outbound\_addr=127.0.0.1,allow\_host\_loopback=true $ podman pod create \-\-network slirp4netns:cidr=192.168.0.0/24 .fi .RE .SH SEE ALSO .PP podman\-pod(1) .SH HISTORY .PP July 2018, Originally compiled by Peter Hunt pehunt@redhat.com \[la]mailto:pehunt@redhat.com\[ra]