github.com/containers/podman/v5@v5.1.0-rc1/docs/source/markdown/podman-kube-down.1.md (about)

     1  % podman-kube-down 1
     2  
     3  ## NAME
     4  podman-kube-down - Remove containers and pods based on Kubernetes YAML
     5  
     6  ## SYNOPSIS
     7  **podman kube down** [*options*] *file.yml|-|https://website.io/file.yml*
     8  
     9  ## DESCRIPTION
    10  **podman kube down** reads a specified Kubernetes YAML file, tearing down pods that were created by the `podman kube play` command via the same Kubernetes YAML
    11  file. Any volumes that were created by the previous `podman kube play` command remain intact unless the `--force` options is used. If the YAML file is
    12  specified as `-`, `podman kube down` reads the YAML from stdin. The input can also be a URL that points to a YAML file such as https://podman.io/demo.yml.
    13  `podman kube down` tears down the pods and containers created by `podman kube play` via the same Kubernetes YAML from the URL. However,
    14  `podman kube down` does not work with a URL if the YAML file the URL points to has been changed or altered since the creation of the pods and containers using
    15  `podman kube play`.
    16  
    17  ## OPTIONS
    18  
    19  #### **--force**
    20  
    21  Tear down the volumes linked to the PersistentVolumeClaims as part --down
    22  
    23  ## EXAMPLES
    24  
    25  Example YAML file `demo.yml`:
    26  ```
    27  apiVersion: v1
    28  kind: Pod
    29  metadata:
    30  ...
    31  spec:
    32    containers:
    33    - command:
    34      - top
    35      - name: container
    36        value: podman
    37      image: foobar
    38  ...
    39  ```
    40  
    41  Remove the pod and containers as described in the `demo.yml` file
    42  ```
    43  $ podman kube down demo.yml
    44  Pods stopped:
    45  52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6
    46  Pods removed:
    47  52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6
    48  ```
    49  
    50  Remove the pod and containers as described in the `demo.yml` file YAML sent to stdin
    51  ```
    52  $ cat demo.yml | podman kube play -
    53  Pods stopped:
    54  52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6
    55  Pods removed:
    56  52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6
    57  ```
    58  
    59  Remove the pods and containers as described in the `demo.yml` file YAML read from a URL
    60  ```
    61  $ podman kube down https://podman.io/demo.yml
    62  Pods stopped:
    63  52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6
    64  Pods removed:
    65  52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6
    66  ```
    67  `podman kube down` does not work with a URL if the YAML file the URL points to has been changed
    68  or altered since it was used to create the pods and containers.
    69  
    70  ## SEE ALSO
    71  **[podman(1)](podman.1.md)**, **[podman-kube(1)](podman-kube.1.md)**, **[podman-kube-play(1)](podman-kube-play.1.md)**, **[podman-kube-generate(1)](podman-kube-generate.1.md)**, **[containers-certs.d(5)](https://github.com/containers/image/blob/main/docs/containers-certs.d.5.md)**