re_deploy_nginx.sh 1006 Bytes
# 更新健康检查使用根路径
kubectl patch deployment -n ecommerce frontend -p '{
  "spec": {
    "template": {
      "spec": {
        "containers": [{
          "name": "frontend",
          "livenessProbe": {
            "httpGet": {
              "path": "/",
              "port": 80
            },
            "initialDelaySeconds": 10,
            "periodSeconds": 10,
            "timeoutSeconds": 5,
            "failureThreshold": 3
          },
          "readinessProbe": {
            "httpGet": {
              "path": "/",
              "port": 80
            },
            "initialDelaySeconds": 5,
            "periodSeconds": 5,
            "timeoutSeconds": 3,
            "failureThreshold": 3
          },
          "startupProbe": {
            "httpGet": {
              "path": "/",
              "port": 80
            },
            "initialDelaySeconds": 10,
            "periodSeconds": 10,
            "failureThreshold": 30
          }
        }]
      }
    }
  }
}'