Improvement for k8s.io/docs/concepts/workloads/pods/pod-lifecycle/
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.
@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.
Hi @mikeplem please give me some more information regarding this issue that what do
/assign
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.
/language en /sig node
/triage accepted /priority backlog
Sure, let's make a change along these lines.
(help welcome)
thanks, I would like to work on this /assign