Question

Kubernetes LB health check documentation questions

I noticed that in the documentation https://www.digitalocean.com/docs/kubernetes/how-to/configure-load-balancers/ the following statement is made

By default, the load balancer performs health checks on the worker nodes over HTTP on port 80 at the webserver root.

However, when I look at the LB configuration UI for a K8s cluster, it is set to tcp://0.0.0.0:30666

Which should it be? What if the scheduler puts all of the pods that respond to http on only one node? It seems like this default rule would direct traffic to a node that couldn’t serve it?


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

John Kwiatkoski
DigitalOcean Employee
DigitalOcean Employee badge
December 4, 2019
Accepted Answer

Hi there,

What youre seeing there is a nodeport that is where the LB checks the health on the node. If you use kubectl to describe the pertinent service you will see that this 30666 nodeport translates to a different container port (probably 80).

kubectl describe svc <service_name> give output like this:

… Port: http 80/TCP TargetPort: http/TCP NodePort: http 30541/TCP …

In my example the LB reaches the node on port 30541 but that traffic actually hits the container on port 80. That is what is meant by that sentence.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more