当前位置:网站首页>Kubernetes Pod 排错指南
Kubernetes Pod 排错指南
2022-06-29 13:44:00 【富士康质检员张全蛋】
Pod排错
Pod 各种异常现象,可能的原因以及解决方法。
- 查看 Pod 状态: kubectl get pod <pod-name> -o wide
- 查看 Pod 的 yaml 配置: kubectl get pod <pod-name> -o yaml
- 查看 Pod 事件: kubectl describe pod <pod-name>
- 查看容器日志: kubectl logs <pod-name> [-c <container-name>]
Failed
失败(Failed):Pod中的所有容器都已终止了,并且至少有一个容器是因为失败终止。即容器以非0状态退出或者被系统禁止。 (容器进程主动退出)
- 集群网络有问题,Pod 连不上集群 DNS 服务
- 集群 DNS 服务挂了,无法响应解析请求
- Service 或域名地址配置有误,本身是无法解析的地址
程序配置有误
- 配置文件格式错误,程序启动解析配置失败报错退出
- 配置内容不符合规范,比如配置中某个字段是必选但没有填写,配置校验不通过,程序报错主动退出
Pod 一直处于 Unknown 状态
通常是节点失联,没有上报状态给 apiserver,到达阀值后 controller-manager 认为节点失联并将其状态置为 Unknown 。
- 节点高负载导致无法上报
- 节点宕机
- 节点被关机
- 网络不通
Pod 一直处于 Error 状态
通常处于 Error 状态说明 Pod 启动过程中发生了错误。常见的原因包括:
- 依赖的 ConfigMap、Secret 或者 PV 等不存在
- 请求的资源超过了管理员设置的限制,比如超过了 LimitRange 等
- 违反集群的安全策略,比如违反了 PodSecurityPolicy 等
- 容器无权操作集群内的资源,比如开启 RBAC 后,需要为 ServiceAccount 配置角色绑定
边栏推荐
- Dynamics 365Online Lookup查找字段多选
- Hardware development notes (VIII): basic process of hardware development, making a USB to RS232 module (VII): creating a basic dip component (crystal oscillator) package and associating the principle
- Thinkpad VMware 安装虚拟机出现此主机支持 Intel VT-x,但 Intel VT-x 处于禁用状态(问题解决方法)
- golang7_TCP编程
- golang代码规范整理
- Redis的数据过期清除策略 与 内存淘汰策略
- golang6 反射
- unity吃豆人小游戏,迷宫实现
- Redis为什么这么快?Redis是单线程还是多线程?
- 微信小程序:图片秒加水印制作生成
猜你喜欢
随机推荐
Equivalence class partition method for test case design method
HTAP X 云原生: TiDB 加速释放数据价值,实现数据敏捷
Five years after graduation, I asked all the leaders around me and summarized their learning methods
Redis为什么这么快?Redis是单线程还是多线程?
单端口RAM实现FIFO
微信小程序:大红喜庆版UI猜灯谜又叫猜字谜
测试用例设计方法之等价类划分方法
Recruiting talents and seeking development | Jincang of the National People's Congress won the "best employer school recruitment case Award"
内网穿透(nc)
微信小程序:修复采集接口版云开发表情包
Why does ETL often become ELT or even let?
Getting started with SQLite3
每周 Postgres 世界动态 2022w25
微信小程序:万圣节头像框生成工具
Distributed cache for memcached
Hardware development notes (VIII): basic process of hardware development, making a USB to RS232 module (VII): creating a basic dip component (crystal oscillator) package and associating the principle
MySQL数据库:drop、truncate、delete的区别
Goby full port scan
goby如何导出扫描结果
go-zero微服务实战系列(七、请求量这么高该如何优化)









