Is this a BUG REPORT or FEATURE REQUEST?: Y
Uncomment only one, leave it on its own line:
/kind bug
/kind feature
What happened:
lifecycle hook preStop is called only when user force-stop/kill the pod/job. It is not getting called when the pod is completed successfully.
What you expected to happen:
preStop hook should be called whenever the pod is exited either it is with success or failure
How to reproduce it (as minimally and precisely as possible):
just by following instructions from https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#hook-details
Anything else we need to know?:
Environment:
- Kubernetes version (use
kubectl version):
- Cloud provider or hardware configuration:
- OS (e.g. from /etc/os-release):
- Kernel (e.g.
uname -a):
- Install tools:
- Others:
Is this a BUG REPORT or FEATURE REQUEST?: Y
/kind bug
What happened:
lifecycle hook preStop is called only when user force-stop/kill the pod/job. It is not getting called when the pod is completed successfully.
What you expected to happen:
preStop hook should be called whenever the pod is exited either it is with success or failure
How to reproduce it (as minimally and precisely as possible):
just by following instructions from https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#hook-details
Anything else we need to know?:
Environment:
kubectl version):uname -a):