Kubernetes API health endpoints

    The Kubernetes API server provides 3 API endpoints (, livez and readyz) to indicate the current status of the API server. The healthz endpoint is deprecated (since Kubernetes v1.16), and you should use the more specific livez and readyz endpoints instead. The livez endpoint can be used with the --livez-grace-period flag to specify the startup duration. For a graceful shutdown you can specify the --shutdown-delay-duration with the /readyz endpoint. Machines that check the /livez/readyz of the API server should rely on the HTTP status code. A status code 200 indicates the API server is healthy/live/ready, depending on the called endpoint. The more verbose options shown below are intended to be used by human operators to debug their cluster or understand the state of the API server.

    The following examples will show how you can interact with the health API endpoints.

    or from a remote host with authentication:

    1. kubectl get --raw='/readyz?verbose'

    The output will look like this:

      The output show that the check is excluded:

      Individual health checks

      FEATURE STATE: Kubernetes v1.23 [alpha]

      1. curl -k https://localhost:6443/livez/etcd