k8s基础概念 pod启动、停止之前执行命令
作者:互联网
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"]
———————————————— 版权声明:本文为CSDN博主「Happywzy~」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/wzy_168/article/details/106547685
标签:执行命令,exec,nginx,command,usr,pod,k8s,lifecycle,postStart 来源: https://www.cnblogs.com/RRecal/p/15699192.html