删除 Kubernetes 就绪探针

Jor*_*ado 4 google-cloud-platform kubernetes kubernetes-helm

我的部署的 readinessProbe 配置如下:

 readinessProbe:
    port: 8080
    path: /ready
    initialDelaySeconds: 30
    failureThreshold: 60
    periodSeconds: 10
    timeoutSeconds: 15
Run Code Online (Sandbox Code Playgroud)

由于某种原因我想删除探针。但是,从我的 YML 文件中删除它后,我的部署未成功,因为看起来 Pod 从未被视为准备就绪。检查 GCP 时,我发现结果 YML 文件有一个就绪探针,它指向一些我没有在任何地方设置的“默认值”:

    readinessProbe:
      failureThreshold: 3
      httpGet:
        path: /ready
        port: 80
        scheme: HTTP
      initialDelaySeconds: 5
      periodSeconds: 10
      successThreshold: 1
      timeoutSeconds: 5
Run Code Online (Sandbox Code Playgroud)

有没有办法真正永久删除 ReadinessProbe?

小智 7

您需要将 readinessProbe 设置为 null 值,如下所示:

readinessProbe: null
Run Code Online (Sandbox Code Playgroud)