Skip to content
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

Graceful node shutdown (alpha 1.20 feature) docs [KEP: 2000] #24918

Merged

Conversation

bobbypage
Copy link
Member

@bobbypage bobbypage commented Nov 6, 2020

Add docs for graceful node shutdown alpha 1.20 feature.

PRs:
kubernetes/kubernetes#96129

KEP:
KEP 2000 (Graceful Node Shutdown).

Issues:
Enhancement issue: kubernetes/enhancements#2000

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 6, 2020
@k8sio-netlify-preview-bot
Copy link
Collaborator

k8sio-netlify-preview-bot commented Nov 6, 2020

Deploy preview for kubernetes-io-vnext-staging processing.

Building with commit 13cc09f

https://app.netlify.com/sites/kubernetes-io-vnext-staging/deploys/5fb76dfab93ea200079433d1

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 6, 2020
@k8s-ci-robot k8s-ci-robot added language/en Issues or PRs related to English language sig/docs Categorizes an issue or PR as relevant to SIG Docs. labels Nov 6, 2020
@bobbypage
Copy link
Member Author

/sig node
/milestone 1.20

@k8s-ci-robot
Copy link
Contributor

@bobbypage: You must be a member of the kubernetes/website-milestone-maintainers GitHub team to set the milestone. If you believe you should be able to issue the /milestone command, please contact your Website milestone maintainers and have them propose you as an additional delegate for this responsibility.

In response to this:

/sig node
/milestone 1.20

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the sig/node Categorizes an issue or PR as relevant to SIG Node. label Nov 6, 2020
@annajung
Copy link
Contributor

annajung commented Nov 6, 2020

/milestone 1.20
/assign
/hold pending merge kubernetes/kubernetes#96129

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 6, 2020
@k8s-ci-robot k8s-ci-robot added this to the 1.20 milestone Nov 6, 2020
@annajung
Copy link
Contributor

Hi @bobbypage

Friendly reminder that docs ready for review deadline is coming up on Nov 23rd, right after Kubecon NA. We would appreciate it if you could provide most of the doc content for this feature early so that it can be reviewed by Sig Docs before Kubecon and other events happening in November.

When it's ready to be reviewed, please don't forget to remove the word placeholder from the title. thank you!

@annajung
Copy link
Contributor

/hold cancel
k/k pr merged

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 12, 2020
@irvifa
Copy link
Member

irvifa commented Nov 14, 2020

@bobbypage LGTM I think this one good to go after you address Anna’s feedback

Copy link
Member

@irvifa irvifa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 14, 2020
@sftim
Copy link
Contributor

sftim commented Nov 19, 2020

The feature gate also needs a description.

/lgtm cancel

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 19, 2020
@bobbypage bobbypage force-pushed the graceful-node-shutdown-docs branch 2 times, most recently from 2472506 to 2e89a4d Compare November 19, 2020 19:45
@bobbypage
Copy link
Member Author

I have updated with a description of the feature gate, PTAL again.

@bobbypage bobbypage changed the title Placeholder: Graceful node shutdown docs [KEP: 2000] Graceful node shutdown (alpha 1.20 feature) docs [KEP: 2000] Nov 19, 2020
@sftim
Copy link
Contributor

sftim commented Nov 19, 2020

This is placeholder for graceful node shutdown docs.

Please update PR description to confirm this is ready for review.

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 20, 2020
@bobbypage
Copy link
Member Author

Done, updated, PTAL again.

Copy link
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside: I might blog about this, mentioning the sample output of systemd-inhibit during node shutdown.

Markdown LGTM. I think this is OK without tech review from a SIG Node member, too.
/lgtm

If you have enabled the `GracefulNodeShutdown` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/), then the kubelet attempts to detect the node system shutdown and terminates pods running on the node.
Kubelet ensures that pods follow the normal [pod termination process](/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination) during the node shutdown.

When the `GracefulNodeShutdown` feature gate is enabled, kubelet uses [systemd inhibitor locks](https://www.freedesktop.org/wiki/Software/systemd/inhibit/) to delay the node shutdown with a given duration. During a shutdown kubelet terminates pods in two phases:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this rely on the node running systemd?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, since this is using the systemd inhibitor locks. Do you think it makes sense to call out that this depends explicitly on node running systemd or is it implied with the sentence regarding systemd inhibitor locks?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added issue #25171 to track adding more documentation about graceful node shutdown.

There are style conventions for how to explain prerequisites, so the place to explain in detail what's required is there.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 20, 2020
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 4866b10d5abc214d627c2e10c1f3e898371fc7fa

@sftim sftim dismissed their stale review November 20, 2020 10:09

Superseded

@bobbypage
Copy link
Member Author

Thanks for taking a look @sftim. Would be happy to work with you on a blog if you're interested, feel free to ping me.

Also one more question -- do you think this is the best place for this content? I added it under content/en/docs/concepts/architecture/nodes.md, but maybe there's a better place to add the info. Let me know if you have some thoughts here.

@sftim
Copy link
Contributor

sftim commented Nov 20, 2020

Also one more question -- do you think this is the best place for this content? I added it under content/en/docs/concepts/architecture/nodes.md, but maybe there's a better place to add the info. Let me know if you have some thoughts here.

There might be a better place for this content; however with KubeCon still running and the release burn down imminent, I am wary of recommending a reorganization. Let's get this merged and then reflect on alternative homes for these details.

@bobbypage
Copy link
Member Author

Sounds good, this should be good go, let's merge it and then will reevaluate after as you mentioned.

@irvifa
Copy link
Member

irvifa commented Nov 20, 2020

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: irvifa

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 20, 2020
@k8s-ci-robot k8s-ci-robot merged commit e3076ed into kubernetes:dev-1.20 Nov 20, 2020
If you have enabled the `GracefulNodeShutdown` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/), then the kubelet attempts to detect the node system shutdown and terminates pods running on the node.
Kubelet ensures that pods follow the normal [pod termination process](/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination) during the node shutdown.

When the `GracefulNodeShutdown` feature gate is enabled, kubelet uses [systemd inhibitor locks](https://www.freedesktop.org/wiki/Software/systemd/inhibit/) to delay the node shutdown with a given duration. During a shutdown kubelet terminates pods in two phases:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added issue #25171 to track adding more documentation about graceful node shutdown.

There are style conventions for how to explain prerequisites, so the place to explain in detail what's required is there.


{{< feature-state state="alpha" for_k8s_version="v1.20" >}}

If you have enabled the `GracefulNodeShutdown` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/), then the kubelet attempts to detect the node system shutdown and terminates pods running on the node.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this better:

Suggested change
If you have enabled the `GracefulNodeShutdown` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/), then the kubelet attempts to detect the node system shutdown and terminates pods running on the node.
If you have enabled the `GracefulNodeShutdown` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/), and the node is using [systemd](https://www.freedesktop.org/wiki/Software/systemd/) as its init process, then the kubelet attempts to detect the node system shutdown. Once node shutdown is detected the kubelet terminates local pods and informs the cluster's API server.

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/docs Categorizes an issue or PR as relevant to SIG Docs. sig/node Categorizes an issue or PR as relevant to SIG Node. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants