首页 > 其他 > 详细

k8s-启动、退出动作

时间:2019-12-06 16:13:41      阅读:1268      评论:0      收藏:0      [点我收藏+]

vim post.yaml

 1 apiVersion: v1
 2 kind: Pod
 3 metadata:
 4   name: lifecycle-demo
 5 spec:
 6   containers:
 7   - name: lifecycle-demo-container
 8     image: nginx
 9     lifecycle:
10       postStart:
11         exec:
12           command: ["/bin/sh","-c","echo Hello from the postStart handler > /usr/share/message"]
13       preStop:
14         exec:
15           command: ["/bin/sh","-c","echo Hello from the postStop handler >> /usr/share/message"]

 

k8s-启动、退出动作

原文:https://www.cnblogs.com/BachrRR/p/11995856.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!