re_deploy_nginx.sh
1006 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# 更新健康检查使用根路径
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
          }
        }]
      }
    }
  }
}'