|
| 1 | +--- |
| 2 | +title: 查明节点上所使用的容器运行时 |
| 3 | +content_type: task |
| 4 | +weight: 10 |
| 5 | +--- |
| 6 | +<!-- |
| 7 | +title: Find Out What Container Runtime is Used on a Node |
| 8 | +content_type: task |
| 9 | +reviewers: |
| 10 | +- SergeyKanzhelev |
| 11 | +weight: 10 |
| 12 | +--> |
| 13 | + |
| 14 | +<!-- overview --> |
| 15 | + |
| 16 | +<!-- |
| 17 | +This page outlines steps to find out what [container runtime](/docs/setup/production-environment/container-runtimes/) |
| 18 | +the nodes in your cluster use. |
| 19 | +--> |
| 20 | +本页面描述查明集群中节点所使用的[容器运行时](/zh/docs/setup/production-environment/container-runtimes/) |
| 21 | +的步骤。 |
| 22 | + |
| 23 | +<!-- |
| 24 | +Depending on the way you run your cluster, the container runtime for the nodes may |
| 25 | +have been pre-configured or you need to configure it. If you're using a managed |
| 26 | +Kubernetes service, there might be vendor-specific ways to check what container runtime is |
| 27 | +configured for the nodes. The method described on this page should work whenever |
| 28 | +the execution of `kubectl` is allowed. |
| 29 | +--> |
| 30 | +取决于你运行集群的方式,节点所使用的容器运行时可能是事先配置好的, |
| 31 | +也可能需要你来配置。如果你在使用托管的 Kubernetes 服务, |
| 32 | +可能存在特定于厂商的方法来检查节点上配置的容器运行时。 |
| 33 | +本页描述的方法应该在能够执行 `kubectl` 的场合下都可以工作。 |
| 34 | + |
| 35 | +## {{% heading "prerequisites" %}} |
| 36 | + |
| 37 | +<!-- |
| 38 | +Install and configure `kubectl`. See [Install Tools](/docs/tasks/tools/#kubectl) section for details. |
| 39 | +--> |
| 40 | +安装并配置 `kubectl`。参见[安装工具](/zh/docs/tasks/tools/#kubectl) 节了解详情。 |
| 41 | + |
| 42 | +<!-- |
| 43 | +## Find out the container runtime used on a Node |
| 44 | +
|
| 45 | +Use `kubectl` to fetch and show node information: |
| 46 | +--> |
| 47 | +## 查明节点所使用的容器运行时 |
| 48 | + |
| 49 | +使用 `kubectl` 来读取并显示节点信息: |
| 50 | + |
| 51 | +```shell |
| 52 | +kubectl get nodes -o wide |
| 53 | +``` |
| 54 | + |
| 55 | +<!-- |
| 56 | +The output is similar to the following. The column `CONTAINER-RUNTIME` outputs |
| 57 | +the runtime and its version. |
| 58 | +--> |
| 59 | +输出如下面所示。`CONTAINER-RUNTIME` 列给出容器运行时及其版本。 |
| 60 | + |
| 61 | +```none |
| 62 | +# For dockershim |
| 63 | +NAME STATUS VERSION CONTAINER-RUNTIME |
| 64 | +node-1 Ready v1.16.15 docker://19.3.1 |
| 65 | +node-2 Ready v1.16.15 docker://19.3.1 |
| 66 | +node-3 Ready v1.16.15 docker://19.3.1 |
| 67 | +``` |
| 68 | + |
| 69 | +```none |
| 70 | +# For containerd |
| 71 | +NAME STATUS VERSION CONTAINER-RUNTIME |
| 72 | +node-1 Ready v1.19.6 containerd://1.4.1 |
| 73 | +node-2 Ready v1.19.6 containerd://1.4.1 |
| 74 | +node-3 Ready v1.19.6 containerd://1.4.1 |
| 75 | +``` |
| 76 | + |
| 77 | +<!-- |
| 78 | +Find out more information about container runtimes |
| 79 | +on [Container Runtimes](/docs/setup/production-environment/container-runtimes/) page. |
| 80 | +--> |
| 81 | +你可以在[容器运行时](/zh/docs/setup/production-environment/container-runtimes/) |
| 82 | +页面找到与容器运行时相关的更多信息。 |
| 83 | + |
0 commit comments