Single health check for all services in an Openshift/Kubernetes cluster

10/16/2019

My question is this. Imagine that we have two datacenters, DC1 and DC2 running two Openshift clusters which have the same configuration (same applications, etc.) in an active active configuration.

Each openshift cluster has Application-A which calls Application-B Imagine that we have a load balancer infront of the two datacenters. This load balancer routes requests from the Internet to Application-A in round-robin fashion.

LB --> Application-A --> Application-B

We can configure a healthcheck endpoint in Application-A and configure the loadbalancer to call that healthcheck.

So if the healcheck of Application-A fails in DC1 (e.g. all pods of Application-A in DC1 are down), the loadbalancer will not route requests to Application-A in DC1 and will only route the requests to Application-A in DC2.

But for some reason, if all pods of Application-B in DC1 fails, the requests to Application-A in DC1 will still be forwarded by the loadbalancer and Application-A will throw errors because it cannot call Application-B.

I know we could create a health check endpoint for Application-B and our LB can call that as well.

Now imagine we have applications A, B, C, D, ...J, K.

Getting the LB to check health of all the endpoints is not an elegant thing.

Does openshift or kubernetes provide any elegant mechanism for a load balancer to figure out that all the cerfices (or let's say a list of services) are healthy without us having to write health end points to all apps and making the LB call all of them?

-- user3754482
kubernetes
openshift

0 Answers