[root@k8s-master01 k8s-test]# cat lifecyle.yaml apiVersion: v1 kind: Pod metadata: name: lifecycle-demo namespace: default spec: containers: - name: lifecycle-demo-container image: kone.com/library/nginx imagePullPolicy: IfNotPresent lifecycle: postStart: exec: