Hey everyone,
I hope you’re all doing well.
I’ve been working on setting up a multi-node cluster using the Kubeadm tool. Everything seemed to be going smoothly until I ran into an issue with the kubectl command not connecting to the kubeapi server. Upon further investigation using the crictl tool, I noticed that the pods were constantly in an exited state and kept rebooting.
In my search for a solution, I discovered that the configuration provided by the Kubernetes documentation and the CKA lecture video was not working as expected. Specifically, the following configuration snippet:
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
...
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
SystemdCgroup = true
Instead, I stumbled upon a version 2 configuration that resolved my issue:
version = 2
[plugins]
[plugins."io.containerd.grpc.v1.cri"]
[plugins."io.containerd.grpc.v1.cri".containerd]
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes]
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
runtime_type = "io.containerd.runc.v2"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
SystemdCgroup = true
I implemented this configuration and it resolved my issue. However, I must admit that I don’t fully understand why it worked or where else this configuration might be documented, as I only found it in GitHub issues.
If anyone can shed some light on this, I’d greatly appreciate it. Thanks!