Services Health Check on k8s-Sync Node

12/13/2019

How to configure the health check for the service that is automatically registered using the Consul sync Catalog.?

-- Ankit Singh
consul
kubernetes
minikube

1 Answer

12/13/2019

The health checks Kubernetes performs are called "probes". There are three types of probes - liveness, readiness, and startup - and they are checks on the application/process running in a Container, not the Kubernetes Service(s) in front of the application's Pods. (One Pod can have one or more Containers; usually, as a best practice, a single application/process runs in a given Container)

Automatically syncing Kubernetes Services to Consul has no bearing on the probes executed against Containers running in Pods on the same Kubernetes cluster.

Kubernetes wouldn't check the health of Consul services synced to Kubernetes.

The answer to the question

How to configure the health check for the service that is automatically registered using the Consul sync Catalog.?

is "It is not possible to configure Kubernetes probes for the Kubernetes Services synced with Consul or for Consul Services synced with Kubernetes. Kubernetes probes are configured for the application/process running in Container that is in a Kubernetes Pod".

-- gears
Source: StackOverflow