Kubernetes---啟動及退出動作


 

apiVersion: v1 
kind: Pod 
metadata:
  name: lifecycle-demo 
spec:
  containers:
  - name:lifecycle-demo-container 
    image: nginx 
    1ifecycle:
      poststart:  #啟動時運行
        exec:
          command: ["/bin/sh","-c","echo Hello from the postStart handler> /usr/share/message"] 
      prestop:  #退出時運行
        exec: 
          command: ["/bin/sh","-c","echo Hello from the poststop handler> /usr/share/message"]

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM