I’m trying to execute some command in preStop hook in container, but I don’t see anything in logs/events. Can someone please help me how to check preStop logs and verify if it was really execute?
`apiVersion: v1
kind: Pod
metadata:
name: lifecycle-demo
spec:
containers:
- name: lifecycle-demo-container
image: nginx
lifecycle:
postStart:
exec:
command: ["/bin/sh", “-c”, ’ echo “i: (date)”; ']
preStop:
exec:
command: ["/bin/sh","-c","echo Hello from the preStop handler "]
terminationGracePeriodSeconds: 180`