Permalink
Cannot retrieve contributors at this time
# https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/ | |
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: lifecycle-demo | |
spec: | |
containers: | |
- name: lifecycle-demo-container | |
image: nginx | |
lifecycle: | |
postStart: | |
exec: | |
command: ["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"] | |
preStop: | |
exec: | |
command: ["/usr/sbin/nginx","-s","quit"] |