TransWikia.com

Kubernetes : how does healthCheckNodePort used to select ready nodes for loadbalancing

Stack Overflow Asked by Abdelghani on November 30, 2020

I try to understand how healthCheckNodePort works.
The API reference says :

healthCheckNodePort specifies the healthcheck nodePort for the service

Another document says :

To top it off, the Kubernetes service controller only adds those nodes
into the load balancer backend config that are Ready and Schedulable

but it is not clear to me how kubernetes actually uses this port to exclude nodes that are not ready. For instance :

1- Does kubernetes use the readinessProbe of the pods backing the service to assess nodes readiness and what happens if such pods dont define any readiness probe or use non http probe (for instance exec action)

2- is it possible to show the ready and schedulable nodes backing a service. I cant find such information with kubectl describe svc

3- I have understood that healthCheckNodePort works only with service type set to loadBalcer and externalTrafficPolicy set to local. Why then can I curl the node not hosting the pod backing my service and get a valid response? It seems kubernetes redirects the request to the pod even thought I have set externalTrafficPolicy to local.

Thank you in advance for any tips or redirection to a well suited documentation.

Abdelghani

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP