Get call to Service endpoint returning OK only if all pods are running

Asking for help? Comment out what you need so we can get more information to help you!

Cluster information:

Kubernetes version:

Client Version: version.Info{Major:“1”, Minor:“15”, GitVersion:“v1.15.0”, GitCommit:“e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529”, GitTreeState:“clean”, BuildDate:“2019-06-19T16:40:16Z”, GoVersion:“go1.12.5”, Compiler:“gc”, Platform:“linux/amd64”}
Server Version: version.Info{Major:“1”, Minor:“17”, GitVersion:“v1.17.0”, GitCommit:“70132b0f130acc0bed193d9ba59dd186f0e634cf”, GitTreeState:“clean”, BuildDate:“2019-12-07T21:12:17Z”, GoVersion:“go1.13.4”, Compiler:“gc”, Platform:“linux/amd64”}

Cloud being used: (put bare-metal if not on a public cloud) : baremetal
Installation method: Minikube
Host OS: 18.04.1-Ubuntu
CNI and version:
CRI and version:

You can format your yaml by highlighting it and pressing Ctrl-Shift-C, it will make your output easier to read.

Asking for help? Comment out what you need so we can get more information to help you!

Cluster information:

Kubernetes version:

Client Version: version.Info{Major:“1”, Minor:“15”, GitVersion:“v1.15.0”, GitCommit:“e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529”, GitTreeState:“clean”, BuildDate:“2019-06-19T16:40:16Z”, GoVersion:“go1.12.5”, Compiler:“gc”, Platform:“linux/amd64”}
Server Version: version.Info{Major:“1”, Minor:“17”, GitVersion:“v1.17.0”, GitCommit:“70132b0f130acc0bed193d9ba59dd186f0e634cf”, GitTreeState:“clean”, BuildDate:“2019-12-07T21:12:17Z”, GoVersion:“go1.13.4”, Compiler:“gc”, Platform:“linux/amd64”}

Cloud being used: (put bare-metal if not on a public cloud) : linux vm that has minikube installed
Installation method: minikube
Host OS: 18.04.1-Ubuntu
CNI and version:
CRI and version:

You can format your yaml by highlighting it and pressing Ctrl-Shift-C, it will make your output easier to read.

Assume a deployment A, that has pod A1, A2, A3
Service is service-A which is associated with the deployment
Service endpoint : http://service-A..svc.cluster.local:8282/healthz

A rest get call to service endpoint returns 200 ok if atleast one pod is up and running + ready

Question :

can the rest get call to service endpoint return 200 ok ONLY IF ALL pods are up and running + ready. It should not return OK even if one pod is down

Is there any setting for that?

This is not something k8s can answer. That’s an application level problem - “down” can mean lots of things and k8s probes can only do so much.