Kubernetes Kubelet Service Failed To Start Up On CentOS

When you have installed a kubelet in the Linux machine and You see “Kubernetes kubelet Service failed to start“. So there are many reasons for it. if Kubernetes or kubelet service not working after configuration, so you need to take some steps to start the service. Kubernetes service connection refused when you didn’t set the parameters for running the service. so

Check Out: Install Single Master Kubernetes Using Kubectl On CentOS 7

Kubernetes kubelet Service Failed To Start:

You need to follow all the steps which shown below so

Step 1: You need to Disable the SELinux

vim /etc/sysconfig/selinux
selinux =disabled

Save the file and reboot the machine.

Check Out: Kubernetes Repo Problem with the SSL CA Certificate

Step 2: You need to enable the br_netfilter on the machine.

And put these lines in this file vim /etc/sysctl.d/kb8.conf

net.bridge.bridge-nf-call-ipv6tables =1
net.bridge.bridge-nf-call-iptables =1

Save the file and run the below command

sysctl -p
sysctl --system

Check Out: How To Configure Rancher Container Orchestration Server In Linux

Step 3: Kubernetes does not support the Swap in Linux, So you have to disable it. so

swapoff -a

And also comment the Swap entry in vim /etc/fstab

Check Out: How To Solve Printer Spooler Problem In Windows 10

Step 4: We also need to change the docker default cgroup and put the below code in the vim /etc/docker/daemon.json file.

{
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
},
"storage-driver": "overlay2"
}

You need to reload the daemon and restart the kubelet service. Now everything is set up. It should work now.

systemctl daemon-reload
systemctl restart kubelet

You’re done kubernetes service connection refused kubernetes not working

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment