Is it possible to health check a Kubernetes API server over HTTP or TCP?
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
,
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