11

I need to load balance a cluster of Kubernetes API servers (version 1.7) on DigitalOcean, but the problem is that the Kubernetes API server seemingly only supports HTTPS and the DigitalOcean load balancer can only do HTTP or TCP health checks.

Is there any way to perform health checks of the Kubernetes API server either via HTTP or TCP?

aknuds1
  • 65,625
  • 67
  • 195
  • 317

2 Answers2

6

do a kubectl proxy and then use postman or any tool to send a get request to http://127.0.0.1:8001/healthz/poststarthook/apiservice-status-available-controller

you can use other too

  • /healthz,
  • /healthz/autoregister-completion,
  • /healthz/ping,
  • /healthz/poststarthook/apiservice-registration-controller,
  • /healthz/poststarthook/apiservice-status-available-controller,
  • /healthz/poststarthook/bootstrap-controller,
  • /healthz/poststarthook/ca-registration,
  • /healthz/poststarthook/extensions/third-party-resources,
  • /healthz/poststarthook/generic-apiserver-start-informers,
  • /healthz/poststarthook/kube-apiserver-autoregistration,
  • /healthz/poststarthook/start-apiextensions-controllers,
  • /healthz/poststarthook/start-apiextensions-informers,
  • /healthz/poststarthook/start-kube-aggregator-informers,
  • /healthz/poststarthook/start-kube-apiserver-informers,
rollstuhlfahrer
  • 3,988
  • 9
  • 25
  • 38
Prem Dubey
  • 71
  • 1
  • 6
2

You can hit API server nodes on port 8080 at /healthz and expect to get back a 200 with a body of ok if the API server is up and in good health.

See some test code that hits this endpoint for more details: https://github.com/kubernetes/kubernetes/blob/fe3e7482764ace362b465405c45780d03a8c6706/staging/src/k8s.io/apiserver/pkg/server/healthz/healthz_test.go#L28

vascop
  • 4,972
  • 4
  • 37
  • 50