Today I observed containerd container was used in our K8s prod environment, noting down the investigation and initial learning here.
Some good articles about Docker vs Containerd and Containerd K8s adaption:
- The differences between Docker, containerd, CRI-O and runc
- Dockershim removal is coming. Are you ready?
The investigation was triggered by uneven load in prod K8s cluster. To examine node load, we can use below useful commands:
1 | # check running/runnable queues size |
The grep -E '^[0-9]+'
is used to filter out big number PID threads which are
somehow irrelevant here, and we only care about D
, R
state threads as they
are the key contributors to LA.
Then, I found that the output of docker images/ps -a
was empty, which made me
realize probably a different container runtime was adapted.
Then, I picked a container thread from top
and checked its parent PPID:
1 | # BSD |
Showing the complete thread data with containerd:
1 | root 3515874 0.0 0.0 111720 3712 ? Sl Apr03 28:56 /usr/bin/containerd-shim-runc-v1 |
P.S: A better way to check container runime in K8s:
1 | kubectl get nodes -o wide |