k8s监控检查、存活检查

apiVersion: apps/v1
kind: Deployment
spec:
  replicas: 1
  template:
    spec:
      containers:
      - name: testLivenessProbe
        livenessProbe:        #容器健康检查(可选参数)
          httpGet:
            path: /healthz
            port: 80        #与容器端口保持一致
            scheme: HTTP
          initialDelaySeconds: 30
          timeoutSeconds: 2
          periodSeconds: 10
          failureThreshold: 3        #最少连续探测失败多少次才被认定为失败
        readinessProbe:        #容器启动检查(可选参数)
          httpGet:
            path: /healthz
            port: 80        #与容器端口保持一致
            scheme: HTTP
          initialDelaySeconds: 30
          timeoutSeconds: 2
          periodSeconds: 10
          failureThreshold: 3        #最少连续探测失败多少次才被认定为失败`在这里插入代码片`
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章