Write new Task: Attaching Handlers to Container Lifecycle Events.

This commit is contained in:
steveperry-53
2017-01-10 15:49:33 -08:00
parent 0286b535be
commit 26385f0e46
4 changed files with 108 additions and 1 deletions
@@ -0,0 +1,33 @@
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"]