New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation for API server health checks #21185
Add documentation for API server health checks #21185
Conversation
Deploy preview for kubernetes-io-master-staging ready! Built with commit f1588c0 https://deploy-preview-21185--kubernetes-io-master-staging.netlify.app |
/sig api-machinery |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @johscheuer
Here's some feedback. The main thing you absolutely do need to change is a couple of hyperlinks, you should make these relative links.
I've also commented on whether or not these health check endpoints are aimed at human or machine clients. My guess, without looking at any k/kubernetes source code, is that the HTTP response code can be relied on but the rest of the response is not meant for machine parsing. It'd be good to clarify that.
As well as that there's some style feedback, most of which is there in case it's useful. I've highlighted all the feedback which is purely suggestions and that it's 100% OK for you to stick with your original wording.
I hope this is useful; please feel free to ask questions.
@logicalhan did you want to add anything here?
Thanks for your time and your comments. I will go over them in the next days. |
@johscheuer do you still have time to update your PR based on Tim's review? |
Thanks for the reminder. I will finish this today/tomorrow. |
It looks like a reasonable starting point to me :)
Yeah that's about right. 200 means it's healthy/live/ready. This is going to be consumed mostly by the kubelet (or whatever thing you have that monitors your apiserver) which is going to decide based on the response code. The verbose flag is specifically intended to aid human debugging. It is also probably worth documenting that individual health checks also expose http endpoints which are automatically exposed when the individual health check is registered to the corresponding health endpoint. In other words for each health check you see when you curl
You are also provided For illustration, let's say apiserver is exposed on port 8080, then you can issue the following command: |
becea86
to
500e297
Compare
@sftim i reworked the site and integrated your feedback. Could you review it again? |
I'm afraid we removed @johscheuer can you rebase and revise to match? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor things
/hold This does need a rebase. |
500e297
to
314ad55
Compare
314ad55
to
8308aab
Compare
Each individual health check exposes an http endpoint and could can be checked individually. | ||
The schema for the individual health checks is `/livez/<healthcheck-name>` where `livez` and `readyz` and be used to indicate if you want to check thee liveness or the readiness of the API server. | ||
The `<healthcheck-name>` path can be discovered using the `verbose` flag from above and take the path between `[+]` and `ok`. | ||
These individual health checks should not be consumed by machines but can be helpful for a human operator to debug a system: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we explicitly call out that this is not a supported API (i.e. use these endpoints at your own discretion and we explicitly do not support forward API compatibility on these endpoints)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a feature state or similar to go with that @logicalhan? If it's viable to call them “alpha” then that's easy to do, the website even has a shortcode for that.
(If it's not tracked as a feature state, I feel that could be an issue against k/kubernetes so that at least the lack of tracking is visible).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not really a feature state.. these endpoints are actually pre-versioned, legacy endpoints which do not have the traditional API versioning guarantees.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which is closer: alpha (don't rely on these, a future release could remove them without warning) or GA (you'll get plenty of official notice about deprecation)?
It sounds like the former. Are they perhaps insta-deprecated? I'd like to have some way of relating the stability to https://kubernetes.io/docs/reference/using-api/deprecation-policy/ - even if that means amending the deprecation policy page!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alpha seems reasonable.
Rebased |
@kubernetes/sig-api-machinery-pr-reviews do you have any more feedback on #21185 (comment) and the following comments? |
Is there anything I can help with? |
@johscheuer do you perhaps have a suggestion for someone who'd be a good choice for technical reviewer? If so, we can ask them to take a look. |
@logicalhan has certainly most insight into this. |
@johscheuer please revise in line with #21185 (comment) |
@johscheuer when you get a chance can you please look at this? ☝️ |
I make the requested changes in the next few days! |
Sorry for the delay I added the feature state information. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jimangel The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This PR adds some documentation to the different "health" endpoints of the Kubernetes API server.
Initial implementation PR: kubernetes/kubernetes#78458
Fixes: #20888