Kubernetes 探测事件不可见但失败

标签 kubernetes kubernetes-helm

我正在使用 K8S 1.14和 Helm 3.3.1 .
我有一个应用程序 在没有探针的情况下工作 .然后我设置了两个微不足道的探针:

          livenessProbe:
            exec:
              command:
                - ls
                - /mnt
            initialDelaySeconds: 5
            periodSeconds: 5

          readinessProbe:
            exec:
              command:
                - ls
                - /mnt
            initialDelaySeconds: 5
            periodSeconds: 5
当我通过 helm upgrade 部署时,命令最终(〜5分钟)失败:
Error: UPGRADE FAILED: release my-app failed, and has been rolled back due to atomic being set: timed out waiting for the condition
但是在事件日志中没有任何探测的痕迹:
5m21s       Normal    ScalingReplicaSet         deployment/my-app     Scaled up replica set my-app-7 to 1
5m21s       Normal    Scheduled                 pod/my-app-7-6        Successfully assigned default/my-app-7-6 to gke-foo-testing-foo-testing-node-po-111-r0cu
5m21s       Normal    LoadBalancerNegNotReady   pod/my-app-7-6        Waiting for pod to become healthy in at least one of the NEG(s): [k8s1-222-default-my-app-80-54]
5m21s       Normal    SuccessfulCreate          replicaset/my-app-7   Created pod: my-app-7-6
5m20s       Normal    Pulling                   pod/my-app-7-6        Pulling image "my-registry/my-app:v0.1"
5m20s       Normal    Pulled                    pod/my-app-7-6        Successfully pulled image "my-registry/my-app:v0.1"
5m20s       Normal    Created                   pod/my-app-7-6        Created container my-app
5m20s       Normal    Started                   pod/my-app-7-6        Started container my-app
5m15s       Normal    Attach                    service/my-app        Attach 1 network endpoint(s) (NEG "k8s1-222-default-my-app-80-54" in zone "europe-west3-a")
19s         Normal    ScalingReplicaSet         deployment/my-app     Scaled down replica set my-app-7 to 0
19s         Normal    SuccessfulDelete          replicaset/my-app-7   Deleted pod: my-app-7-6
19s         Normal    Killing                   pod/my-app-7-6        Stopping container my-app

因此,问题是:探测器在做什么以及在哪里?

最佳答案

尝试删除 helm 然后重新应用它:helm del --purge <APPNAME>另外,您使用的是哪个 helm 版本?尝试升级到 v3.2.1 ,有一个 Unresolved 问题试图通过以前失败的升级来修复此事件:https://github.com/helm/helm/issues/5939

关于Kubernetes 探测事件不可见但失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64393383/

相关文章:

kubernetes - 如何在 GKE 中创建具有 ReadWriteMany 访问权限的动态持久卷声明?

kubernetes - 如果 HELM 模板中不存在命名空间,如何创建命名空间?

kubernetes - 如何使用从 Helm stable/airflow 安装的 airflow/kubernetes 运行 airflow CLI 命令?

kubernetes-helm - Helm 变量不区分大小写吗? (模板似乎是。)

kubernetes - 使用多行 shell 脚本作为 helm 值

openshift - "kube-system"命名空间有什么用?

kubernetes - 为GKE部署,服务等启用REST API

kubernetes - Istio 分布式跟踪与 Jaeger 不工作

kubernetes - 从 helm 图表访问/docker-entrypoint-initdb.d

Kubernetes - 服务之间的通信