'\" t .nh .TH podman-kube-play 1 .SH NAME .PP podman-kube-play - Create containers, pods and volumes based on Kubernetes YAML .SH SYNOPSIS .PP \fBpodman kube play\fP [\fIoptions\fP] \fIfile.yml|-|https://website.io/file.yml\fP .SH DESCRIPTION .PP \fBpodman kube play\fP reads in a structured file of Kubernetes YAML. It recreates the containers, pods, or volumes described in the YAML. Containers within a pod are then started, and the ID of the new Pod or the name of the new Volume is output. If the YAML file is specified as "-", then \fBpodman kube play\fR reads the YAML file from stdin. The input can also be a URL that points to a YAML file such as https://podman.io/demo.yml. \fBpodman kube play\fR reads the YAML from the URL and create pods and containers from it. .PP Using the \fB--down\fR command line option, it is also capable of tearing down the pods created by a previous run of \fBpodman kube play\fR\&. .PP Using the \fB--replace\fR command line option, it tears down the pods(if any) created by a previous run of \fBpodman kube play\fR and recreate the pods with the Kubernetes YAML file. .PP Ideally the input file is created by the Podman command (see podman-kube-generate(1)). This guarantees a smooth import and expected results. .PP Currently, the supported Kubernetes kinds are: .RS .IP \(bu 2 Pod .IP \(bu 2 Deployment .IP \(bu 2 PersistentVolumeClaim .IP \(bu 2 ConfigMap .IP \(bu 2 Secret .IP \(bu 2 DaemonSet .RE .PP \fBKubernetes Pods or Deployments\fR .PP Only three volume types are supported by kube play, the \fIhostPath\fP, \fIemptyDir\fP, and \fIpersistentVolumeClaim\fP volume types. .RS .IP \(bu 2 When using the \fIhostPath\fP volume type, only the \fIdefault (empty)\fP, \fIDirectoryOrCreate\fP, \fIDirectory\fP, \fIFileOrCreate\fP, \fIFile\fP, \fISocket\fP, \fICharDevice\fP and \fIBlockDevice\fP subtypes are supported. Podman interprets the value of \fIhostPath\fP \fIpath\fP as a file path when it contains at least one forward slash, otherwise Podman treats the value as the name of a named volume. .IP \(bu 2 When using a \fIpersistentVolumeClaim\fP, the value for \fIclaimName\fP is the name for the Podman named volume. .IP \(bu 2 When using an \fIemptyDir\fP volume, Podman creates an anonymous volume that is attached the containers running inside the pod and is deleted once the pod is removed. .RE .PP Note: The default restart policy for containers is \fBalways\fR\&. You can change the default by setting the \fBrestartPolicy\fR field in the spec. .PP Note: When playing a kube YAML with init containers, the init container is created with init type value \fBonce\fR\&. To change the default type, use the \fBio.podman.annotations.init.container.type\fR annotation to set the type to \fBalways\fR\&. .PP Note: \fIhostPath\fP volume types created by kube play is given an SELinux shared label (z), bind mounts are not relabeled (use \fBchcon -t container_file_t -R \fR). .PP Note: To set userns of a pod, use the \fBio.podman.annotations.userns\fP annotation in the pod/deployment definition. This can be overridden with the \fB--userns\fR flag. .PP Note: Use the \fBio.podman.annotations.volumes-from\fP annotation to bind mount volumes of one container to another. You can mount volumes from multiple source containers to a target container. The source containers that belong to the same pod must be defined before the source container in the kube YAML. The annotation format is \fBio.podman.annotations.volumes-from/targetContainer: "sourceContainer1:mountOpts1;sourceContainer2:mountOpts2"\fR\&. .PP Note: If the \fB:latest\fR tag is used, Podman attempts to pull the image from a registry. If the image was built locally with Podman or Buildah, it has \fBlocalhost\fR as the domain, in that case, Podman uses the image from the local store even if it has the \fB:latest\fR tag. .PP Note: The command \fBpodman play kube\fR is an alias of \fBpodman kube play\fR, and performs the same function. .PP Note: The command \fBpodman kube down\fR can be used to stop and remove pods or containers based on the same Kubernetes YAML used by \fBpodman kube play\fR to create them. .PP Note: To customize the name of the infra container created during \fBpodman kube play\fR, use the \fBio.podman.annotations.infra.name\fP annotation in the pod definition. This annotation is automatically set when generating a kube yaml from a pod that was created with the \fB--infra-name\fR flag set. .PP \fBKubernetes PersistentVolumeClaims\fR .PP A Kubernetes PersistentVolumeClaim represents a Podman named volume. Only the PersistentVolumeClaim name is required by Podman to create a volume. Kubernetes annotations can be used to make use of the available options for Podman volumes. .RS .IP \(bu 2 volume.podman.io/driver .IP \(bu 2 volume.podman.io/device .IP \(bu 2 volume.podman.io/type .IP \(bu 2 volume.podman.io/uid .IP \(bu 2 volume.podman.io/gid .IP \(bu 2 volume.podman.io/mount-options .IP \(bu 2 volume.podman.io/import-source .IP \(bu 2 volume.podman.io/image .RE .PP Use \fBvolume.podman.io/import-source\fR to import the contents of the tarball (.tar, .tar.gz, .tgz, .bzip, .tar.xz, .txz) specified in the annotation's value into the created Podman volume .PP Kube play is capable of building images on the fly given the correct directory layout and Containerfiles. This option is not available for remote clients, including Mac and Windows (excluding WSL2) machines, yet. Consider the following excerpt from a YAML file: .EX apiVersion: v1 kind: Pod metadata: \&... spec: containers: - name: container image: foobar \&... .EE .PP If there is a directory named \fBfoobar\fR in the current working directory with a file named \fBContainerfile\fR or \fBDockerfile\fR, Podman kube play builds that image and name it \fBfoobar\fR\&. An example directory structure for this example looks like: .EX |- mykubefiles |- myplayfile.yaml |- foobar |- Containerfile .EE .PP The build considers \fBfoobar\fR to be the context directory for the build. If there is an image in local storage called \fBfoobar\fR, the image is not built unless the \fB--build\fR flag is used. Use \fB--build=false\fR to completely disable builds. .PP \fBKubernetes ConfigMap\fR .PP Kubernetes ConfigMap can be referred as a source of environment variables or volumes in Pods or Deployments. ConfigMaps aren't a standalone object in Podman; instead, when a container uses a ConfigMap, Podman creates environment variables or volumes as needed. .PP For example, the following YAML document defines a ConfigMap and then uses it in a Pod: .EX apiVersion: v1 kind: ConfigMap metadata: name: foo data: FOO: bar --- apiVersion: v1 kind: Pod metadata: name: foobar spec: containers: - name: container-1 image: foobar envFrom: - configMapRef: name: foo optional: false .EE .PP and as a result environment variable \fBFOO\fR is set to \fBbar\fR for container \fBcontainer-1\fR\&. .PP \fBKubernetes Secret\fR .PP Kubernetes Secret represents a Podman named secret. The Kubernetes Secret is saved as a whole and may be referred to as a source of environment variables or volumes in Pods or Deployments. .PP For example, the following YAML document defines a Secret and then uses it in a Pod: .EX kind: Secret apiVersion: v1 metadata: name: foo data: foo: YmFy # base64 for bar --- apiVersion: v1 kind: Pod metadata: name: foobar spec: containers: - name: container-1 image: foobar env: - name: FOO valueFrom: secretKeyRef: name: foo key: foo .EE .PP and as a result environment variable \fBFOO\fR is set to \fBbar\fR for container \fBcontainer-1\fR\&. .SH OPTIONS .SS \fB--annotation\fP=\fIkey=value\fP .PP Add an annotation to the container or pod. This option can be set multiple times. .SS \fB--authfile\fP=\fIpath\fP .PP Path of the authentication file. Default is \fB${XDG_RUNTIME_DIR}/containers/auth.json\fR on Linux, and \fB$HOME/.config/containers/auth.json\fR on Windows/macOS. The file is created by \fBpodman login\fP\&. If the authorization state is not found there, \fB$HOME/.docker/config.json\fR is checked, which is set using \fBdocker login\fP\&. .PP Note: There is also the option to override the default path of the authentication file by setting the \fBREGISTRY_AUTH_FILE\fR environment variable. This can be done with \fBexport REGISTRY_AUTH_FILE=\fIpath\fP\fP\&. .SS \fB--build\fP .PP Build images even if they are found in the local storage. Use \fB--build=false\fR to completely disable builds. (This option is not available with the remote Podman client) .PP Note: You can also override the default isolation type by setting the BUILDAH_ISOLATION environment variable. export BUILDAH_ISOLATION=oci. See podman-build.1.md for more information. .SS \fB--cert-dir\fP=\fIpath\fP .PP Use certificates at \fIpath\fP (*\&.crt, *\&.cert, *\&.key) to connect to the registry. (Default: /etc/containers/certs.d) For details, see \fBcontainers-certs.d(5)\fP\&. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines) .SS \fB--configmap\fP=\fIpath\fP .PP Use Kubernetes configmap YAML at path to provide a source for environment variable values within the containers of the pod. (This option is not available with the remote Podman client) .PP Note: The \fI--configmap\fP option can be used multiple times or a comma-separated list of paths can be used to pass multiple Kubernetes configmap YAMLs. The YAML file may be in a multi-doc YAML format. But, it must container only configmaps .SS \fB--context-dir\fP=\fIpath\fP .PP Use \fIpath\fP as the build context directory for each image. Requires --build option be true. (This option is not available with the remote Podman client) .SS \fB--creds\fP=\fI[username[:password]]\fP .PP The [username[:password]] to use to authenticate with the registry, if required. If one or both values are not supplied, a command line prompt appears and the value can be entered. The password is entered without echo. .PP Note that the specified credentials are only used to authenticate against target registries. They are not used for mirrors or when the registry gets rewritten (see \fBcontainers-registries.conf(5)\fR); to authenticate against those consider using a \fBcontainers-auth.json(5)\fR file. .SS \fB--force\fP .PP Tear down the volumes linked to the PersistentVolumeClaims as part of --down .SS \fB--help\fP, \fB-h\fP .PP Print usage statement .SS \fB--ip\fP=\fIIP address\fP .PP Assign a static ip address to the pod. This option can be specified several times when kube play creates more than one pod. Note: When joining multiple networks use the \fB--network name:ip=\fP syntax. .SS \fB--log-driver\fP=\fIdriver\fP .PP Set logging driver for all created containers. .SS \fB--log-opt\fP=\fIname=value\fP .PP Logging driver specific options. .PP Set custom logging configuration. The following *name*s are supported: .PP \fBpath\fP: specify a path to the log file (e.g. \fB--log-opt path=/var/log/container/mycontainer.json\fP); .PP \fBmax-size\fP: specify a max size of the log file (e.g. \fB--log-opt max-size=10mb\fP); .PP \fBtag\fP: specify a custom log tag for the container (e.g. \fB--log-opt tag="{{.ImageName}}"\fP\&. It supports the same keys as \fBpodman inspect --format\fP\&. This option is currently supported only by the \fBjournald\fP log driver. .SS \fB--mac-address\fP=\fIMAC address\fP .PP Assign a static mac address to the pod. This option can be specified several times when kube play creates more than one pod. Note: When joining multiple networks use the \fB--network name:mac=\fP syntax. .SS \fB--network\fP=\fImode\fP, \fB--net\fP .PP Set the network mode for the pod. .PP Valid \fImode\fP values are: .RS .IP \(bu 2 \fBbridge[:OPTIONS,...]\fP: Create a network stack on the default bridge. This is the default for rootful containers. It is possible to specify these additional options: .RS .IP \(bu 2 \fBalias=name\fP: Add network-scoped alias for the container. .IP \(bu 2 \fBip=IPv4\fP: Specify a static ipv4 address for this container. .IP \(bu 2 \fBip=IPv6\fP: Specify a static ipv6 address for this container. .IP \(bu 2 \fBmac=MAC\fP: Specify a static mac address for this container. .IP \(bu 2 \fBinterface_name\fP: Specify a name for the created network interface inside the container. .RE .RE .PP For example, to set a static ipv4 address and a static mac address, use \fB--network bridge:ip=10.88.0.10,mac=44:33:22:11:00:99\fR\&. .RS .IP \(bu 2 [:OPTIONS,...]: Connect to a user-defined network; this is the network name or ID from a network created by \fBpodman network create\fP\&. Using the network name implies the bridge network mode. It is possible to specify the same options described under the bridge mode above. Use the \fB--network\fP option multiple times to specify additional networks. .RE .PP For backwards compatibility it is also possible to specify comma-separated networks on the first \fB--network\fP argument, however this prevents you from using the options described under the bridge section above. - \fBnone\fP: Create a network namespace for the container but do not configure network interfaces for it, thus the container has no network connectivity. - \fBcontainer:\fP\fIid\fP: Reuse another container's network stack. - \fBhost\fP: Do not create a network namespace, the container uses 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. - \fBns:\fP\fIpath\fP: Path to a network namespace to join. - \fBprivate\fP: Create a new namespace for the container. This uses the \fBbridge\fP mode for rootful containers and \fBslirp4netns\fP for rootless ones. - \fBslirp4netns[:OPTIONS,...]\fP: use \fBslirp4netns\fP(1) to create a user network stack. This is the default for rootless containers. It is possible to specify these additional options, they can also be set with \fBnetwork_cmd_options\fR in containers.conf: - \fBallow_host_loopback=true|false\fP: Allow slirp4netns to reach the host loopback IP (default is 10.0.2.2 or the second IP from slirp4netns cidr subnet when changed, see the cidr option below). The default is false. - \fBmtu=MTU\fP: Specify the MTU to use for this network. (Default is \fB65520\fR). - \fBcidr=CIDR\fP: Specify ip range to use for this network. (Default is \fB10.0.2.0/24\fR). - \fBenable_ipv6=true|false\fP: Enable IPv6. Default is true. (Required for \fBoutbound_addr6\fR). - \fBoutbound_addr=INTERFACE\fP: Specify the outbound interface slirp binds to (ipv4 traffic only). - \fBoutbound_addr=IPv4\fP: Specify the outbound ipv4 address slirp binds to. - \fBoutbound_addr6=INTERFACE\fP: Specify the outbound interface slirp binds to (ipv6 traffic only). - \fBoutbound_addr6=IPv6\fP: Specify the outbound ipv6 address slirp binds to. - \fBport_handler=rootlesskit\fP: Use rootlesskit for port forwarding. Default. Note: Rootlesskit changes the source IP address of incoming packets to an IP address in the container network namespace, usually \fB10.0.2.100\fR\&. If the application requires the real source IP address, e.g. web server logs, use the slirp4netns port handler. The rootlesskit port handler is also used for rootless containers when connected to user-defined networks. - \fBport_handler=slirp4netns\fP: Use the slirp4netns port forwarding, it is slower than rootlesskit but preserves the correct source IP address. This port handler cannot be used for user-defined networks. .RS .IP \(bu 2 \fBpasta[:OPTIONS,...]\fP: use \fBpasta\fP(1) to create a user-mode networking stack. .br This is only supported in rootless mode. .br By default, IPv4 and IPv6 addresses and routes, as well as the pod interface name, are copied from the host. If port forwarding isn't configured, ports are forwarded dynamically as services are bound on either side (init namespace or container namespace). Port forwarding preserves the original source IP address. Options described in pasta(1) can be specified as comma-separated arguments. .br In terms of pasta(1) options, \fB--config-net\fP is given by default, in order to configure networking when the container is started, and \fB--no-map-gw\fP is also assumed by default, to avoid direct access from container to host using the gateway address. The latter can be overridden by passing \fB--map-gw\fP in the pasta-specific options (despite not being an actual pasta(1) option). .br Also, \fB-t none\fP and \fB-u none\fP are passed if, respectively, no TCP or UDP port forwarding from host to container is configured, to disable automatic port forwarding based on bound ports. Similarly, \fB-T none\fP and \fB-U none\fP are given to disable the same functionality from container to host. .br Some examples: .RS .IP \(bu 2 \fBpasta:--map-gw\fP: Allow the container to directly reach the host using the gateway address. .IP \(bu 2 \fBpasta:--mtu,1500\fP: Specify a 1500 bytes MTU for the \fItap\fP interface in the container. .IP \(bu 2 \fBpasta:--ipv4-only,-a,10.0.2.0,-n,24,-g,10.0.2.2,--dns-forward,10.0.2.3,-m,1500,--no-ndp,--no-dhcpv6,--no-dhcp\fP, equivalent to default slirp4netns(1) options: disable IPv6, assign \fB10.0.2.0/24\fR to the \fBtap0\fR interface in the container, with gateway \fB10.0.2.3\fR, enable DNS forwarder reachable at \fB10.0.2.3\fR, set MTU to 1500 bytes, disable NDP, DHCPv6 and DHCP support. .IP \(bu 2 \fBpasta:-I,tap0,--ipv4-only,-a,10.0.2.0,-n,24,-g,10.0.2.2,--dns-forward,10.0.2.3,--no-ndp,--no-dhcpv6,--no-dhcp\fP, equivalent to default slirp4netns(1) options with Podman overrides: same as above, but leave the MTU to 65520 bytes .IP \(bu 2 \fBpasta:-t,auto,-u,auto,-T,auto,-U,auto\fP: enable automatic port forwarding based on observed bound ports from both host and container sides .IP \(bu 2 \fBpasta:-T,5201\fP: enable forwarding of TCP port 5201 from container to host, using the loopback interface instead of the tap interface for improved performance .RE .RE .PP When no network option is specified and \fIhost\fP network mode is not configured in the YAML file, a new network stack is created and pods are attached to it making possible pod to pod communication. .SS \fB--no-hosts\fP .PP Do not create \fI/etc/hosts\fP for the pod. By default, Podman manages \fI/etc/hosts\fP, adding the container's own IP address and any hosts from \fB--add-host\fP\&. \fB--no-hosts\fP disables this, and the image's \fI/etc/hosts\fP is preserved unmodified. .PP This option conflicts with host added in the Kubernetes YAML. .SS \fB--publish\fP=\fI[[ip:][hostPort]:]containerPort[/protocol]\fP .PP Define or override a port definition in the YAML file. .PP The lists of ports in the YAML file and the command line are merged. Matching is done by using the \fBcontainerPort\fP field. If \fBcontainerPort\fP exists in both the YAML file and the option, the latter takes precedence. .SS \fB--publish-all\fP .PP Setting this option to \fBtrue\fR will expose all ports to the host, even if only specified via \fBcontainerPort\fP in the K8 YAML. In terms of which port will be exposed, \fB--publish\fP has higher priority than \fBhostPort\fP, has higher priority than \fBcontainerPort\fP\&. .PP If set to \fBfalse\fR (which is the default), only ports defined via \fBhostPort\fP or \fB--publish\fP are published on the host. .SS \fB--quiet\fP, \fB-q\fP .PP Suppress output information when pulling images .SS \fB--replace\fP .PP Tears down the pods created by a previous run of \fBkube play\fR and recreates the pods. This option is used to keep the existing pods up to date based upon the Kubernetes YAML. .SS \fB--seccomp-profile-root\fP=\fIpath\fP .PP Directory path for seccomp profiles (default: "/var/lib/kubelet/seccomp"). (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines) .SS \fB--start\fP .PP Start the pod after creating it, set to false to only create it. .SS \fB--tls-verify\fP .PP Require HTTPS and verify certificates when contacting registries (default: \fBtrue\fP). If explicitly set to \fBtrue\fP, TLS verification is used. If set to \fBfalse\fP, TLS verification is not used. If not specified, TLS verification is used unless the target registry is listed as an insecure registry in \fBcontainers-registries.conf(5)\fP .SS \fB--userns\fP=\fImode\fP .PP Set the user namespace mode for the container. .PP If \fB--userns\fR is not set, the default value is determined as follows. - If \fB--pod\fR is set, \fB--userns\fR is ignored and the user namespace of the pod is used. - If the environment variable \fBPODMAN_USERNS\fP is set its value is used. - If \fBuserns\fR is specified in \fBcontainers.conf\fR this value is used. - Otherwise, \fB--userns=host\fR is assumed. .PP \fB--userns=""\fR (i.e., an empty string) is an alias for \fB--userns=host\fR\&. .PP This option is incompatible with \fB--gidmap\fP, \fB--uidmap\fP, \fB--subuidname\fP and \fB--subgidname\fP\&. .PP Rootless user --userns=Key mappings: .TS allbox; l l l l l l . \fBKey\fP \fBHost User\fP \fBContainer User\fP auto $UID T{ nil (Host User UID is not mapped into container.) T} host $UID T{ 0 (Default User account mapped to root user in container.) T} keep-id $UID T{ $UID (Map user account to same UID within container.) T} keep-id:uid=200,gid=210 $UID T{ 200:210 (Map user account to specified UID, GID value within container.) T} nomap $UID T{ nil (Host User UID is not mapped into container.) T} .TE .PP Valid \fImode\fP values are: .PP \fBauto\fP[:\fIOPTIONS,...\fP]: automatically create a unique user namespace. .RS .IP \(bu 2 \fBrootful mode\fR: The \fB--userns=auto\fR flag requires that the user name \fBcontainers\fP be specified in the /etc/subuid and /etc/subgid files, with an unused range of subordinate user IDs that Podman containers are allowed to allocate. .RE .PP Example: \fBcontainers:2147483647:2147483648\fR\&. .RS .IP \(bu 2 \fBrootless mode\fR: The users range from the /etc/subuid and /etc/subgid files will be used. Note running a single container without using --userns=auto will use the entire range of UIDs and not allow further subdividing. See subuid(5). .RE .PP Podman allocates unique ranges of UIDs and GIDs from the \fBcontainers\fR subordinate user IDs. The size of the ranges is based on the number of UIDs required in the image. The number of UIDs and GIDs can be overridden with the \fBsize\fR option. .PP The option \fB--userns=keep-id\fR uses all the subuids and subgids of the user. The option \fB--userns=nomap\fR uses all the subuids and subgids of the user except the user's own ID. Using \fB--userns=auto\fR when starting new containers does not work as long as any containers exist that were started with \fB--userns=keep-id\fR or \fB--userns=nomap\fR\&. .PP Valid \fBauto\fR options: .RS .IP \(bu 2 \fIgidmapping\fP=\fICONTAINER_GID:HOST_GID:SIZE\fP: to force a GID mapping to be present in the user namespace. .IP \(bu 2 \fIsize\fP=\fISIZE\fP: to specify an explicit size for the automatic user namespace. e.g. \fB--userns=auto:size=8192\fR\&. If \fBsize\fR is not specified, \fBauto\fR estimates a size for the user namespace. .IP \(bu 2 \fIuidmapping\fP=\fICONTAINER_UID:HOST_UID:SIZE\fP: to force a UID mapping to be present in the user namespace. .RE .PP The host UID and GID in \fIgidmapping\fP and \fIuidmapping\fP can optionally be prefixed with the \fB@\fR symbol. In this case, podman will look up the intermediate ID corresponding to host ID and it will map the found intermediate ID to the container id. For details see \fB--uidmap\fP\&. .PP \fBcontainer:\fP\fIid\fP: join the user namespace of the specified container. .PP \fBhost\fP or \fB""\fP (empty string): run in the user namespace of the caller. The processes running in the container have the same privileges on the host as any other process launched by the calling user. .PP \fBkeep-id\fP: creates a user namespace where the current user's UID:GID are mapped to the same values in the container. For containers created by root, the current mapping is created into a new user namespace. .PP Valid \fBkeep-id\fR options: .RS .IP \(bu 2 \fIuid\fP=UID: override the UID inside the container that is used to map the current user to. .IP \(bu 2 \fIgid\fP=GID: override the GID inside the container that is used to map the current user to. .RE .PP \fBnomap\fP: creates a user namespace where the current rootless user's UID:GID are not mapped into the container. This option is not allowed for containers created by the root user. .PP \fBns:\fP\fInamespace\fP: run the pod in the given existing user namespace. .SS \fB--wait\fP, \fB-w\fP .PP Run pods and containers in the foreground. Default is false. .PP At any time you can run \fBpodman pod ps\fR in another shell to view a list of the running pods and containers. .PP When attached in the tty mode, you can kill the pods and containers by pressing Ctrl-C or receiving any other interrupt signals. .PP All pods, containers, and volumes created with \fBpodman kube play\fR is removed upon exit. .SH EXAMPLES .PP Recreate the pod and containers described in the specified host YAML file. .EX $ podman kube play demo.yml 52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6 .EE .PP Recreate the pod and containers specified in a YAML file sent to stdin. .EX $ cat demo.yml | podman kube play - 52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6 .EE .PP Tear down the pod and containers as described in the specified YAML file. .EX $ podman kube play --down demo.yml Pods stopped: 52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6 Pods removed: 52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6 .EE .PP Provide multiple configmap files as sources for environment variables within the specified pods and containers. .EX $ podman kube play demo.yml --configmap configmap-foo.yml,configmap-bar.yml 52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6 $ podman kube play demo.yml --configmap configmap-foo.yml --configmap configmap-bar.yml 52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6 .EE .PP Create a pod connected to two networks with a static ip on each. .EX $ podman kube play demo.yml --network net1:ip=10.89.1.5 --network net2:ip=10.89.10.10 52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6 .EE .PP Please take into account that networks must be created first using podman-network-create(1). .PP Create and teardown from a URL pointing to a YAML file. .EX $ podman kube play https://podman.io/demo.yml 52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6 $ podman kube play --down https://podman.io/demo.yml Pods stopped: 52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6 Pods removed: 52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6 .EE .PP \fBpodman kube play --down\fR does not work with a URL if the YAML file the URL points to has been changed or altered. .SH Podman Kube Play Support .PP This document outlines the kube yaml fields that are currently supported by the \fBpodman kube play\fP command. .PP Note: \fBN/A\fP means that the option cannot be supported in a single-node Podman environment. .SH Pod Fields .TS allbox; l l l l . \fBField\fP \fBSupport\fP containers ✅ initContainers ✅ imagePullSecrets no enableServiceLinks no os\&.name no volumes ✅ nodeSelector N/A nodeName N/A affinity\&.nodeAffinity N/A affinity\&.podAffinity N/A affinity\&.podAntiAffinity N/A tolerations\&.key N/A tolerations\&.operator N/A tolerations\&.effect N/A tolerations\&.tolerationSeconds N/A schedulerName N/A runtimeClassName no priorityClassName no priority no topologySpreadConstraints\&.maxSkew N/A topologySpreadConstraints\&.topologyKey N/A topologySpreadConstraints\&.whenUnsatisfiable N/A topologySpreadConstraints\&.labelSelector N/A topologySpreadConstraints\&.minDomains N/A restartPolicy ✅ terminationGracePeriodSeconds ✅ activeDeadlineSeconds no readinessGates\&.conditionType no hostname ✅ setHostnameAsFQDN no subdomain no hostAliases\&.hostnames ✅ hostAliases\&.ip ✅ dnsConfig\&.nameservers ✅ dnsConfig\&.options\&.name ✅ dnsConfig\&.options\&.value ✅ dnsConfig\&.searches ✅ dnsPolicy no hostNetwork ✅ hostPID ✅ hostIPC ✅ shareProcessNamespace ✅ serviceAccountName no automountServiceAccountToken no securityContext\&.runAsUser ✅ securityContext\&.runAsNonRoot no securityContext\&.runAsGroup ✅ securityContext\&.supplementalGroups ✅ securityContext\&.fsGroup no securityContext\&.fsGroupChangePolicy no securityContext\&.seccompProfile\&.type no securityContext\&.seccompProfile\&.localhostProfile no securityContext\&.seLinuxOptions\&.level ✅ securityContext\&.seLinuxOptions\&.role ✅ securityContext\&.seLinuxOptions\&.type ✅ securityContext\&.seLinuxOptions\&.user ✅ securityContext\&.sysctls\&.name ✅ securityContext\&.sysctls\&.value ✅ securityContext\&.windowsOptions\&.gmsaCredentialSpec no securityContext\&.windowsOptions\&.hostProcess no securityContext\&.windowsOptions\&.runAsUserName no .TE .SH Container Fields .TS allbox; l l l l . \fBField\fP \fBSupport\fP name ✅ image ✅ imagePullPolicy ✅ command ✅ args ✅ workingDir ✅ ports\&.containerPort ✅ ports\&.hostIP ✅ ports\&.hostPort ✅ ports\&.name ✅ ports\&.protocol ✅ env\&.name ✅ env\&.value ✅ env\&.valueFrom\&.configMapKeyRef\&.key ✅ env\&.valueFrom\&.configMapKeyRef\&.name ✅ env\&.valueFrom\&.configMapKeyRef\&.optional ✅ env\&.valueFrom\&.fieldRef ✅ env\&.valueFrom\&.resourceFieldRef ✅ env\&.valueFrom\&.secretKeyRef\&.key ✅ env\&.valueFrom\&.secretKeyRef\&.name ✅ env\&.valueFrom\&.secretKeyRef\&.optional ✅ envFrom\&.configMapRef\&.name ✅ envFrom\&.configMapRef\&.optional ✅ envFrom\&.prefix no envFrom\&.secretRef\&.name ✅ envFrom\&.secretRef\&.optional ✅ volumeMounts\&.mountPath ✅ volumeMounts\&.name ✅ volumeMounts\&.mountPropagation no volumeMounts\&.readOnly ✅ volumeMounts\&.subPath no volumeMounts\&.subPathExpr no volumeDevices\&.devicePath no volumeDevices\&.name no resources\&.limits ✅ resources\&.requests ✅ lifecycle\&.postStart no lifecycle\&.preStop no terminationMessagePath no terminationMessagePolicy no livenessProbe ✅ readinessProbe no startupProbe no securityContext\&.runAsUser ✅ securityContext\&.runAsNonRoot no securityContext\&.runAsGroup ✅ securityContext\&.readOnlyRootFilesystem ✅ securityContext\&.procMount ✅ securityContext\&.privileged ✅ securityContext\&.allowPrivilegeEscalation ✅ securityContext\&.capabilities\&.add ✅ securityContext\&.capabilities\&.drop ✅ securityContext\&.seccompProfile\&.type no securityContext\&.seccompProfile\&.localhostProfile no securityContext\&.seLinuxOptions\&.level ✅ securityContext\&.seLinuxOptions\&.role ✅ securityContext\&.seLinuxOptions\&.type ✅ securityContext\&.seLinuxOptions\&.user ✅ securityContext\&.windowsOptions\&.gmsaCredentialSpec no securityContext\&.windowsOptions\&.hostProcess no securityContext\&.windowsOptions\&.runAsUserName no stdin no stdinOnce no tty no .TE .SH PersistentVolumeClaim Fields .TS allbox; l l l l . \fBField\fP \fBSupport\fP volumeName no storageClassName ✅ volumeMode no accessModes ✅ selector no resources\&.limits no resources\&.requests ✅ .TE .SH ConfigMap Fields .TS allbox; l l l l . \fBField\fP \fBSupport\fP binaryData ✅ data ✅ immutable no .TE .SH Deployment Fields .TS allbox; l l l l . \fBField\fP \fBSupport\fP replicas T{ ✅ (the actual replica count is ignored and set to 1) T} selector ✅ template ✅ minReadySeconds no strategy\&.type no strategy\&.rollingUpdate\&.maxSurge no strategy\&.rollingUpdate\&.maxUnavailable no revisionHistoryLimit no progressDeadlineSeconds no paused no .TE .SH DaemonSet Fields .TS allbox; l l l l . \fBField\fP \fBSupport\fP selector ✅ template ✅ minReadySeconds no strategy\&.type no strategy\&.rollingUpdate\&.maxSurge no strategy\&.rollingUpdate\&.maxUnavailable no revisionHistoryLimit no .TE .SH SEE ALSO .PP \fBpodman(1)\fP, \fBpodman-kube(1)\fP, \fBpodman-kube-down(1)\fP, \fBpodman-network-create(1)\fP, \fBpodman-kube-generate(1)\fP, \fBpodman-build(1)\fP, \fBcontainers-certs.d(5)\fP