github.com/containers/podman/v2@v2.2.2-0.20210501105131-c1e07d070c4c/docs/source/markdown/podman-play-kube.1.md (about) 1 % podman-play-kube(1) 2 3 ## NAME 4 podman-play-kube - Create pods and containers based on Kubernetes YAML 5 6 ## SYNOPSIS 7 **podman play kube** [*options*] *file*__.yml__ 8 9 ## DESCRIPTION 10 **podman play kube** will read in a structured file of Kubernetes YAML. It will then recreate 11 the pod and containers described in the YAML. The containers within the pod are then started and 12 the ID of the new Pod is output. 13 14 Ideally the input file would be one created by Podman (see podman-generate-kube(1)). This would guarantee a smooth import and expected results. 15 16 Note: HostPath volume types created by play kube will be given an SELinux private label (Z) 17 18 ## OPTIONS 19 20 #### **--authfile**=*path* 21 22 Path of the authentication file. Default is ${XDG\_RUNTIME\_DIR}/containers/auth.json, which is set using `podman login`. 23 If the authorization state is not found there, $HOME/.docker/config.json is checked, which is set using `docker login`. 24 25 Note: You can also override the default path of the authentication file by setting the REGISTRY\_AUTH\_FILE 26 environment variable. `export REGISTRY_AUTH_FILE=path` 27 28 #### **--cert-dir**=*path* 29 30 Use certificates at *path* (\*.crt, \*.cert, \*.key) to connect to the registry. 31 Default certificates directory is _/etc/containers/certs.d_. (Not available for remote commands) 32 33 #### **--configmap**=*path* 34 35 Use Kubernetes configmap YAML at path to provide a source for environment variable values within the containers of the pod. 36 37 Note: The *--configmap* option can be used multiple times or a comma-separated list of paths can be used to pass multiple Kubernetes configmap YAMLs. 38 39 #### **--creds** 40 41 The [username[:password]] to use to authenticate with the registry if required. 42 If one or both values are not supplied, a command line prompt will appear and the 43 value can be entered. The password is entered without echo. 44 45 #### **--log-driver**=driver 46 47 Set logging driver for all created containers. 48 49 #### **--network**=*networks*, **--net** 50 51 A comma-separated list of the names of CNI networks the pod should join. 52 53 #### **--quiet**, **-q** 54 55 Suppress output information when pulling images 56 57 #### **--seccomp-profile-root**=*path* 58 59 Directory path for seccomp profiles (default: "/var/lib/kubelet/seccomp"). (Not available for remote commands) 60 61 #### **--start**=*true|false* 62 63 Start the pod after creating it, set to false to only create it. 64 65 #### **--tls-verify**=*true|false* 66 67 Require HTTPS and verify certificates when contacting registries (default: true). If explicitly set to true, 68 then TLS verification will be used. If set to false, then TLS verification will not be used. If not specified, 69 TLS verification will be used unless the target registry is listed as an insecure registry in registries.conf. 70 71 #### **--help**, **-h** 72 73 Print usage statement 74 75 ## EXAMPLES 76 77 Recreate the pod and containers as described in a file called `demo.yml` 78 ``` 79 $ podman play kube demo.yml 80 52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6 81 ``` 82 83 Provide `configmap-foo.yml` and `configmap-bar.yml` as sources for environment variables within the containers. 84 ``` 85 $ podman play kube demo.yml --configmap configmap-foo.yml,configmap-bar.yml 86 52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6 87 88 $ podman play kube demo.yml --configmap configmap-foo.yml --configmap configmap-bar.yml 89 52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6 90 ``` 91 92 CNI network(s) can be specified as comma-separated list using ``--network`` 93 ``` 94 $ podman play kube demo.yml --network cni1,cni2 95 52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6 96 ``` 97 98 Please take into account that CNI networks must be created first using podman-network-create(1). 99 100 ## SEE ALSO 101 podman(1), podman-container(1), podman-pod(1), podman-generate-kube(1), podman-play(1), podman-network-create(1) 102 103 ## HISTORY 104 December 2018, Originally compiled by Brent Baude (bbaude at redhat dot com)