Overview
In Konvoy, the default container runtime is containerd. There may be situations in which you are unable to access a cluster via kubectl but need to manually view or stop certain containers directly on a node.
How to
After connecting to a node via ssh, you can use sudo crictl ps
to list the containers running on the node. The output should resemble this:
-sh-4.2$ sudo crictl ps CONTAINER ID IMAGE CREATED STATE NAME ATTEMPT POD ID eb99e296b97f0 d0e68c52f3aea 15 hours ago Running fluent-bit 1 cea6eadab37e1 9d4b4ad8cdb9e e5a616e4b9cf6 6 days ago Running node-exporter 0 9c80c48efcede 4e15170aa6394 e73d08f153d87 6 days ago Running elasticsearch 0 2e79741ade916 b4551bf5db3aa 5e0ebbb684ce9 6 days ago Running local-volume-provisioner 0 85a2cb2356c1b ec594c0d9484b 89ec9da682137 6 days ago Running opsportal-landing 0 db76cf2d984c7 fe00b48ee7195 f1bd7856cbf2c 6 days ago Running speaker 0 b888b5d7d4ee7 0efd9b212013c d55847f56b28b 6 days ago Running bird-metrics 0 9b6d5215a4463 f57f21cb92cf4 c91d49e6f044f 6 days ago Running calico-node 0 9b6d5215a4463 cec2f736c0c96 42d94120af75d 6 days ago Running kube-proxy 0 46dacde345f19
Once you have identified a container ID that you wish to stop, you can use sudo crictl stop
.
For more information on crictl, please refer to the crictl documentation: https://github.com/kubernetes-sigs/cri-tools/blob/master/docs/crictl.md
Please note that crictl is an endpoint for CRI-compatible container runtimes. If you are somehow unable to use crictl to list or stop containers, you can use the containerd-specific CLI, ctr
.
Its documentation is here: https://github.com/projectatomic/containerd/blob/master/docs/cli.md