Kubernetes: Solve error message: Get "http://127.0.0.1:10521/healthz": dial up 127.0.0.1:10251: connect: connection ref used



 



After installing my k8s-cluster, I noticed an error message on the kubernetes controller manager en and scheduler. The error message wasL

Get "http://127.0.0.1:10521/healthz": dial up 127.0.0.1:10251: connect: connection ref used

The procedure below descibes how to solve this issue.

Check component status via the following command:

kubectl get cs

You will get the error message below


You can solve this issue by changing the yaml files from kube-controller-manager and the kube-scheduler on the master node of your kubernetes cluster.
Adjust via nano the kube-controller-manager.yaml file.

sudo nano /etc/kubernetes/manifests/kube-controller-manager.yaml
Put a "#" before following line  "- --port=0" and save your changes.
 
Do the same for the kube-scheduler.yaml file
 sudo nano /etc/kubernetes/manifests/kube-scheduler.yaml
Put a "#" before following line  "- --port=0" and save your changes.

Restart docker to apply these modifications. Keep in mind the will reset K8S-master node !

sudo systemctl restart docker

Check component status again via 

kubectl get cs
And every is should be running ok now.





Comments