k8s容器启动不了,一直重启, 报红提示Not Ready

k8s容器启动不了,一直重启, 报红提示Not Ready

反复多次重启后,才能够启动成功。

发现是 启动时间过长,不断达到了失败阈值,于是会不断重启。

将 failureThreshold、 initialDelaySeconds、periodSeconds 这几个参数设置大一些,就可以启动了。

k8s探针类型及探针配置:

详情见: https://blog.csdn.net/sinat_32502451/article/details/139837159

示例:

复制代码
		  livenessProbe:
            failureThreshold: 6
            httpGet:
              path: /my-service/act/health
              port: 8110
              scheme: HTTP
            initialDelaySeconds: 60
            periodSeconds: 20
            successThreshold: 1
            timeoutSeconds: 5
          name: my-service
          ports:
            - containerPort: 8110
              protocol: TCP
          readinessProbe:
            failureThreshold: 6
            httpGet:
              path: /my-service/act/health
              port: 8110
              scheme: HTTP
            initialDelaySeconds: 60
            periodSeconds: 20
            successThreshold: 1
            timeoutSeconds: 5
相关推荐
小锋学长生活大爆炸1 天前
【教程】免Root在Termux上安装Docker
运维·docker·容器
进击切图仔1 天前
常用 Docker 命令备份
运维·docker·容器
阿里云云原生1 天前
巨人网络《超自然行动组》携手阿里云打造云原生游戏新范式
云原生
我在人间贩卖青春1 天前
C++之STL容器
c++·容器·stl
71ber1 天前
深入理解 HAProxy:四层/七层透传与高级 ACL 调度详解
linux·云原生·haproxy
A-刘晨阳1 天前
K8S 之 DaemonSet
运维·云原生·容器·kubernetes·daemonset
小锋学长生活大爆炸1 天前
【教程】查看docker容器的TCP连接和带宽使用情况
tcp/ip·docker·容器
ccino .1 天前
【Drupal文件上传导致跨站脚本执行(CVE-2019-6341)】
运维·网络安全·docker·容器
sun03222 天前
【Docker】构建镜像时使用的 Dockerfile ,以及其中的 MicroDNF
运维·docker·容器
2501_948114242 天前
资深程序员真实测评:9家中转API平台实战横评
微服务·云原生·架构