Fixing Kubernetes CoreDNS Addon Failure
When encountering a failure in the CoreDNS addon step during Kubernetes initialization, you can resolve it by updating the containerd configuration to use runc v2. Here's how:
- Open the file
/etc/containerd/config.toml
in a text editor. - Locate the section related to runc configuration:
- Modify it to use runc v2. Replace the existing configuration with the following:
- Save the changes and exit the text editor.
- Restart the containerd service to apply the new configuration:
- Additionally, restart the kubelet service to ensure it picks up the changes:
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
SystemdCgroup = true
version = 2
[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
sudo systemctl restart containerd
sudo systemctl restart kubelet
After performing these steps, try running kubeadm init
again to see if the issue with the CoreDNS addon is resolved.
1 Comments
Good work!
ReplyDelete