Kubelet Service: “Error getting node” err=”node \”workernode\” not found”

I faced this error while resetting my cluster to swap memory enabled node. Basically this error comes if you have swap memory enabled and kubelet service is not able to find eligible node for running services.

After resetting kubernetes cluster on Master node I initialized my kubernetes cluster with extra argument of “–fail-swap-on=false” .

root@ubmaster:/home/ubuntu# echo 'Environment="KUBELET_EXTRA_ARGS=--fail-swap-on=false"' >> /etc/systemd/system/kubelet.service.d/10-kubeadm.conf

ubuntu@ubmaster:~$ sudo kubeadm init --ignore-preflight-errors Swap --pod-network-cidr=xx.xx.xx.xx/24


So this error I was getting for kubelet services on worker node, after enabling swap and trying to join it with master node.

I verified that new kubeadm.conf file with extra argument was also transferred successfully on worker node, yet it was not taking expected parameters.

What I missed actually was resetting my worker node as well.

root@ubworker:/home/ubuntu# kubeadm reset

Once reset was done, worker node joined cluster and kubelet services came up.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s