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
相关推荐
小陈工7 分钟前
2026年3月24日技术资讯洞察:边缘AI商业化,Java26正式发布与开源大模型成本革命
java·运维·开发语言·人工智能·python·容器·开源
vpk11242 分钟前
使用 Docker Compose 快速安装 MongoDB
mongodb·docker·容器
阿里云云原生1 小时前
连登顶会!阿里云多项研究成果大幅提升运维智能精度与效率
云原生
培小新1 小时前
五、Dokcer网络
linux·运维·docker·容器
阿里云云原生1 小时前
从养一只虾到开好虾场,HiClaw 规模化养虾的详细解读
云原生
杭州杭州杭州2 小时前
Docker实验2----4
运维·docker·容器
河码匠3 小时前
Kubernests YAML 详细之卷(PV、PVC、StorageClass)
云原生·容器·kubernetes
码上上班3 小时前
k8s控制器,daemonset
云原生·容器·kubernetes
码上上班3 小时前
k8s中安装metrics,实现hpa
容器·kubernetes·excel
nix.gnehc4 小时前
基于K8s+Helm部署OpenClaw实践笔记
kubernetes·openclaw