NAME 名称

podman-kube-down - Remove containers and pods based on Kubernetes YAML
podman-kube-down - 根据 Kubernetes YAML 删除容器和 Pod

SYNOPSIS 概要

podman kube down [options] file.yml|-|https://website.io/file.yml
podman kube down [选项] file.yml|-|https://website.io/file.yml

DESCRIPTION 描述

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 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 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. podman kube down tears down the pods and containers created by podman kube play via the same Kubernetes YAML from the URL. However, 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 podman kube play.
podman kube down 读取指定的 Kubernetes YAML 文件,拆除由相同 Kubernetes YAML 文件通过 podman kube play 命令创建的 Pod。除非使用 --force 选项,否则任何由之前的 podman kube play 命令创建的卷都将保持不变。如果将 YAML 文件指定为 -podman kube down 将从 stdin 读取 YAML。输入也可以是指向 YAML 文件的 URL,例如 https://podman.io/demo.yml。 podman kube down 拆除由 URL 中的相同 Kubernetes YAML 创建的 Pod 和容器。但是,如果 URL 指向的 YAML 文件自创建 Pod 和容器使用 podman kube play 以来已更改或更改,则 podman kube down 无法与 URL 一起使用。

OPTIONS 选项

--force

Tear down the volumes linked to the PersistentVolumeClaims as part --down
拆除与 PersistentVolumeClaims 关联的卷作为一部分 --down

EXAMPLES 示例

Example YAML file demo.yml:
示例 YAML 文件 demo.yml

apiVersion: v1
kind: Pod
metadata:
...
spec:
  containers:
  - command:
    - top
    - name: container
      value: podman
    image: foobar
...

Remove the pod and containers as described in the demo.yml file
根据 demo.yml 文件中的说明删除 pod 和容器

$ podman kube down demo.yml
Pods stopped:
52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6
Pods removed:
52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6

Remove the pod and containers as described in the demo.yml file YAML sent to stdin
根据从标准输入发送的 demo.yml 文件 YAML 中的说明删除 pod 和容器

$ cat demo.yml | podman kube play -
Pods stopped:
52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6
Pods removed:
52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6

Remove the pods and containers as described in the demo.yml file YAML read from a URL
根据从 URL 读取的 demo.yml 文件 YAML 中的说明删除 pods 和容器

$ podman kube down https://podman.io/demo.yml
Pods stopped:
52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6
Pods removed:
52182811df2b1e73f36476003a66ec872101ea59034ac0d4d3a7b40903b955a6

podman kube down does not work with a URL if the YAML file the URL points to has been changed or altered since it was used to create the pods and containers.
如果 URL 指向的 YAML 文件在用于创建 pod 和容器之后已被更改或修改,则 podman kube down 无法与 URL 一起使用。

SEE ALSO 参见 ¶

podman(1), podman-kube(1), podman-kube-play(1), podman-kube-generate(1), containers-certs.d(5)