Ingress Liveness and Readiness of pods

3/18/2019

I use 6 separate microservice inside the one kubernetes cluster and I have Configured Liveness and Readiness Probes also. I used an ingress load balancer to call microservice endpoints.

example:

<ingress_host>/api/auth-server/<api-endpoint>

Our main assumption is When all pods are available then that cluster is working fine.

are there any way to get health endpoint via ingress to check the health of the kubernetes cluster.

I need to config Akamai Load Balancer. For that, I need to expose the health endpoint. That health endpoint need to ensure that all the pods are works or not

-- wthamira
kubernetes
kubernetes-ingress

1 Answer

3/18/2019

I dont think that there is any concept such as a healthy cluster , and i am not sure why you would need it. I would suggest an alternative way to check this, write a simple script which will check or keep on checking after regular time intervals if all your pods/microservices are ready , you can use something similar in lines of below which is for checking the nodes but you should be able to do the same for pods.

JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}' \
 && kubectl get nodes -o jsonpath="$JSONPATH" | grep "Ready=True"```
-- fatcook
Source: StackOverflow