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
上一篇:以太网之ICMP


下一篇:记录若依SysConfigMapper.selectConfigList初始化加载不到问题