apiVersion: v1
kind: Pod
metadata:
  name: pod-startup-exec
  namespace: default
  labels:
    app: pod-startup-exec
spec:
  containers:
  - name: pod-startup-exec-container
    image: registry.cn-beijing.aliyuncs.com/wangxiaochun/pod-test:v0.1
    imagePullPolicy: IfNotPresent
    startupProbe:
      exec:
        command: ['/bin/sh', '-c', '[ "$(curl -s 127.0.0.1/livez)" == "OK" ]']
      initialDelaySeconds: 60
      timeoutSeconds: 1                #此容器返回结果需要花几秒时间，所以此处1s会导致检查失败，可以设为5s以上可以成功
      periodSeconds: 5
      successThreshold: 1
      failureThreshold: 1
