Ticker

6/recent/ticker-posts

Kubernetes CoreDNS Addon Failure

Fixing Kubernetes CoreDNS Addon Failure

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:

  1. Open the file /etc/containerd/config.toml in a text editor.
  2. Locate the section related to runc configuration:
  3. [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
      [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
        SystemdCgroup = true
    
  4. Modify it to use runc v2. Replace the existing configuration with the following:
  5. 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
  6. Save the changes and exit the text editor.
  7. Restart the containerd service to apply the new configuration:
  8. sudo systemctl restart containerd
  9. Additionally, restart the kubelet service to ensure it picks up the changes:
  10. sudo systemctl restart kubelet

After performing these steps, try running kubeadm init again to see if the issue with the CoreDNS addon is resolved.

Post a Comment

1 Comments