Skip to content

Instantly share code, notes, and snippets.

@swagfin
Last active September 22, 2024 19:58
Show Gist options
  • Save swagfin/d425b6ab36034a1aae8f22465ad6b228 to your computer and use it in GitHub Desktop.
Save swagfin/d425b6ab36034a1aae8f22465ad6b228 to your computer and use it in GitHub Desktop.
Microk8s - Fixing Node Re-connection after Re-boot Issue

Fixing K8s Node UnHealthy after Re-boot Issue

Issue:

Nodes in the Kubernetes cluster may remain in an "Unhealthy" state on the control plane/master node after they are restarted. This problem occurs because the nf_conntrack module, which is essential for network connection tracking, is not automatically loaded on reboot.

Solution:

To ensure nodes reconnect properly after a restart, you need to make sure the nf_conntrack module is loaded at boot on all workers nodes thought this command;

sudo modprobe nf_conntrack && grep -qxF 'nf_conntrack' /etc/modules || echo 'nf_conntrack' | sudo tee -a /etc/modules

Happy Clustering

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment