Pod Stuck in Terminating State Due to PreStop Hook.
Problem
Reason:"FailedPreStopHook", Message:"Exec lifecycle hook ([/bin/bash -c service httpd stop; sleep 20]) for Container \"container1\" in Pod \"pod_name3(a8xxx-xxxx-xxx-xxx-xx5e9bb1)\" failed - error: command '/bin/bash -c service httpd stop; sleep 20' exited with 137: , message: \"\\x1b[60G[\\x1b[0;32m OK \\x1b[0;39m]\\rForcibly killing nodemanager which has gone rogue. Please check if any of the Applications are still hanging.Environment
Cause
# kubectl get pod pod_name3 -n ns1 -oyaml
apiVersion: v1
kind: Pod
metadata:
name: pod_name3
namespace: ns1
spec:
containers:
preStop:
exec:
command:
- /bin/bash
- -c
- service stop httpd; sleep 20Solution
Additional Information
Last updated
