Interview Prep/Kubernetes/Nodes, kubelet and container runtime

All Pods on a node fail with `rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial unix /run/containerd/containerd.sock: connect: no such file or directory"`.

IntermediateTroubleshootingNodes, kubelet and container runtime
Answer

Likely causes → containerd is not running: crashed, failed to start after an upgrade or a bad config.toml, or was OOM killed.

Diagnose →

systemctl status containerd
journalctl -u containerd -n 100 --no-pager
containerd config dump >/dev/null    # validates the config

Fix → Fix the config error and systemctl restart containerd, then systemctl restart kubelet. Running containers usually survive a containerd restart because shims keep them alive.

Prevent → Pin containerd versions in the node image, test config changes on a canary node, and reserve memory for system daemons.

All Kubernetes questions

More on Nodes, kubelet and container runtime