启动退出动作
Posted xw115428
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了启动退出动作相关的知识,希望对你有一定的参考价值。
main containers启动之前还会有个start动作,结束后有个stop动作
示例:
apiVersion: v1 kind: Pod metadata: name: lifecycle-demo spec: containers: - name: lifecycle-demo-nginx image: nginx:1.15 lifecycle: postStart: exec: command: ["/bin/sh","-c","echo hello world >/root/test"] postStop: exec: command: ["/usr/sbin/nginx","-s","quit"]
以上是关于启动退出动作的主要内容,如果未能解决你的问题,请参考以下文章