I'm trying to set a grace shutdown period for my pods. I found out you can add a field called terminationGracePeriodSeconds
to the helm charts to set the period. I then looked for example and crossed upon these:
In the above link they define the value in a kind: pod
template.
https://pracucci.com/graceful-shutdown-of-kubernetes-pods.html
In the above link they define the value in a kind: deployment
template.
Is there a difference between the 2 kinds in regard to where I define this value?
CodePudding user response:
Is there a difference between the 2 kinds in regard to where I define this value?
A Deployment
has a field template:
and that is actually a PodTemplate
(most structure of a Pod
) that includes the terminationGracePeriodSeconds
property.
A good way to check documentations for fields is to use kubectl explain
.
E.g.
kubectl explain Deployment.spec.template.spec
and
kubectl explain Pod.spec