website icon indicating copy to clipboard operation
website copied to clipboard

Improvement for k8s.io/docs/concepts/workloads/pods/pod-lifecycle/

Open mikeplem opened this issue 1 year ago • 7 comments

I believe the following note under https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination should be clarified to say that this modification cannot be done to a running Pod. This text as it is does not make that clear.

If the preStop hook needs longer to complete than the default grace period allows, you must modify terminationGracePeriodSeconds to suit this.

mikeplem avatar Apr 09 '25 17:04 mikeplem

@0xShubhamSolanki: The label triage/accepted cannot be applied. Only GitHub organization members can add the label.

In response to this:

/triage accepted

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-sigs/prow repository.

k8s-ci-robot avatar Apr 10 '25 19:04 k8s-ci-robot

Hi @mikeplem please give me some more information regarding this issue that what do

Gourav2580 avatar Apr 12 '25 17:04 Gourav2580

/assign

Gourav2580 avatar Apr 12 '25 18:04 Gourav2580

Here is the scenario I was working under. We have a Deployment running a couple of Pods and when needing to decrease the replica count, we need to make sure the Pod that gets terminated will shutdown gracefully. I was looking at the preStop hook to handle the SIGTERM signal but the problem is we do not how long the process will take to complete. I was under the assumption that the we could modify the value of terminationGracePeriodSeconds on the running Pod to make sure we tell the K8s API we are safe to terminate. This quote implies to me that the running Pod's terminationGracePeriodSeconds value can be modified but I have learned that is not the case.

If the preStop hook needs longer to complete than the default grace period allows, you must modify terminationGracePeriodSeconds to suit this.

I am asking if this quote can be updated to state that it is not possible to update the terminationGracePeriodSeconds value of a running Pod.

mikeplem avatar Apr 14 '25 12:04 mikeplem

/language en /sig node

/triage accepted /priority backlog

Sure, let's make a change along these lines.

lmktfy avatar Apr 27 '25 21:04 lmktfy

(help welcome)

lmktfy avatar Jan 11 '26 20:01 lmktfy

thanks, I would like to work on this /assign

Aryan-Bagale avatar Jan 13 '26 12:01 Aryan-Bagale