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
相关推荐
qq_452396231 小时前
第十四篇:《K8s 网络模型与 CNI 插件(Calico、Flannel、Cilium)》
网络·kubernetes·php
日取其半万世不竭2 小时前
Memos 私人碎片笔记怎么搭?Docker 加 Caddy 一小时跑起来
笔记·docker·容器
写代码的学渣2 小时前
docker部署开源实时观测系统hertzbeat
docker·容器·开源
互联网推荐官2 小时前
上海软件定制开发公司推荐:从PaaS工程化路径看D-coding的技术取舍
云原生·云计算·paas·软件开发·开发经验·上海
sbjdhjd2 小时前
从零搭建企业级 CI/CD(下):Jenkins+GitLab+Harbor 全链路实战指南
git·servlet·ci/cd·云原生·云计算·gitlab·jenkins
TimberWill2 小时前
Docker使用总结
运维·docker·容器
蜀道山老天师3 小时前
Docker 实战:构建永不宕机的服务器监控探针(ServerStatus)
运维·服务器·docker·容器
正经教主3 小时前
【docker基础】第十周:CI/CD集成
运维·docker·容器
java_cj3 小时前
从0到1启动kube-apiserver:深入源码解析API Server启动全流程
docker·容器·kubernetes
Hadoop_Liang12 小时前
使用Kubernetes Gateway API实现域名访问应用
容器·kubernetes·gateway