Skip to content

Commit d3ad42f

Browse files
committed
Add info about finding the runtime endpoint
1 parent e003523 commit d3ad42f

File tree

1 file changed

+49
-3
lines changed

1 file changed

+49
-3
lines changed

content/en/docs/tasks/administer-cluster/migrating-from-dockershim/find-out-runtime-you-use.md

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,67 @@ kubectl get nodes -o wide
3232
The output is similar to the following. The column `CONTAINER-RUNTIME` outputs
3333
the runtime and its version.
3434

35+
For Docker Engine, the output is similar to this:
36+
3537
```none
36-
# For dockershim
3738
NAME STATUS VERSION CONTAINER-RUNTIME
3839
node-1 Ready v1.16.15 docker://19.3.1
3940
node-2 Ready v1.16.15 docker://19.3.1
4041
node-3 Ready v1.16.15 docker://19.3.1
4142
```
43+
If your runtime shows as Docker Engine, you still might not be affected by the
44+
removal of dockershim in Kubernetes 1.24. [Check the runtime
45+
endpoint](#which-endpoint) to see if you use dockershim. If you don't use
46+
dockershim, you aren't affected.
47+
48+
For containerd, the output is similar to this:
4249

4350
```none
44-
# For containerd
4551
NAME STATUS VERSION CONTAINER-RUNTIME
4652
node-1 Ready v1.19.6 containerd://1.4.1
4753
node-2 Ready v1.19.6 containerd://1.4.1
4854
node-3 Ready v1.19.6 containerd://1.4.1
4955
```
5056

5157
Find out more information about container runtimes
52-
on [Container Runtimes](/docs/setup/production-environment/container-runtimes/) page.
58+
on [Container Runtimes](/docs/setup/production-environment/container-runtimes/)
59+
page.
60+
61+
## Find out what container runtime endpoint you use {#which-endpoint}
62+
63+
The container runtime talks to the kubelet over a Unix socket using the [CRI
64+
protocol](/docs/concepts/architecture/cri/), which is based on the gRPC
65+
framework. The kubelet acts as a client, and the runtime acts as the server.
66+
In some cases, you might find it useful to know which socket your nodes use. For
67+
example, with the removal of dockershim in Kubernetes 1.24 and later, you might
68+
want to know whether you use Docker Engine with dockershim.
69+
70+
{{<note>}}
71+
If you currently use Docker Engine in your nodes with `cri-dockerd`, you aren't
72+
affected by the dockershim removal.
73+
{{</note>}}
74+
75+
You can check which socket you use by checking the kubelet configuration on your
76+
nodes.
77+
78+
1. Read the starting commands for the kubelet process:
79+
80+
```
81+
tr \\0 ' ' < /proc/"$(pgrep kubelet)"/cmdline
82+
```
83+
If you don't have `tr` or `pgrep`, check the command line for the kubelet
84+
process manually.
85+
86+
1. In the output, look for the `--container-runtime` flag and the
87+
`--container-runtime-endpoint` flag.
88+
89+
* If your nodes use Kubernetes v1.23 and earlier and these flags aren't
90+
present or if the `--container-runtime` flag is not `remote`,
91+
you use the dockershim socket with Docker Engine.
92+
* If the `--container-runtime-endpoint` flag is present, check the socket
93+
name to find out which runtime you use. For example,
94+
`unix:///run/containerd/containerd.sock` is the containerd endpoint.
95+
96+
If you use Docker Engine with the dockershim, [migrate to a different runtime](/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd/),
97+
or, if you want to continue using Docker Engine in v1.24 and later, migrate to a
98+
CRI-compatible adapter like [`cri-dockerd`](https://github.com/Mirantis/cri-dockerd).

0 commit comments

Comments
 (0)