Kubernetes Components keep getting restarted automatically

Hello,

I have bootstrapped kubernetes using kubeadm, I have followed the tutorial and using containerd as the container runtime, I have configured the cgroup for kubelet and containerd as well. However, the kubernetes component keep restarting on their, each component gets restarted after a while, I am not sure why, any advise would be appreciated,

You can see in the below screenshot, each service gets exited and then starts again after a while

Hi @shahbazahmedshah91,

Can you please check the log of pod restarted and also the output of the “describe”

Regard

Hello, thank you for your reply, I have fixed the issue. After much searching, I found that this happened due to some cgroup and containerd mismatch. I added the following code in /etc/containerd/config.toml

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

After added it and restarting containerd, the pods stopped restarting by themselves. :slight_smile: Hope it helps someone.

1 Like