Last active
July 31, 2020 14:29
-
-
Save muralidharan-rade/5b22b60df2ac9aca99cc5fe7ac22b2c2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: demopod | |
spec: | |
containers: | |
- image: demo:web | |
name: demo-container | |
ports: | |
- containerPort: 8080 | |
lifecycle: | |
postStart: | |
exec: | |
command: ["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"] | |
preStop: | |
exec: | |
command: ["/bin/sh", "-c", "echo Stopping server > /usr/share/message1; sleep 10; sh /usr/local/tomcat/bin/catalina.sh stop"] | |
terminationGracePeriodSeconds: 45 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment