当前位置:网站首页>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查找字段多选
- C language__ VA_ ARGS__ Usage of
- Discard Tkinter! Simple configuration to quickly generate cool GUI!
- 强大、优秀的文件管理软件评测:图片管理、书籍管理、文献管理
- Introduction to esp8266: three programming methods "suggestions collection"
- 昨天面试居然聊了半个多小时的异常处理
- Tiktok's global short video dominance may be reversed by YouTube
- 微信小程序:图片秒加水印制作生成
- Koa2+better-sqlite3 to add, delete, change and query
- Interview high concurrent, cool!! (high energy in the whole process, collection recommended)
猜你喜欢

灵感收集·创意写作软件评测:Flomo、Obsidian Memo、Napkin、FlowUs

Leetcode question brushing: String 07 (repeated substring)

喜迎市科协“十大”•致敬科技工作者 | 卢毅:守护电网传输安全的探索者

Investors fell off the altar: 0 sales in half a year, transferred to business and delivered takeout

By proxy, by buyout, the wild era of domestic end-to-end travel is waiting for the next "eternal robbery"

靠代理,靠买断,国产端游的蛮荒时代等待下一个《永劫无间》

丢弃 Tkinter!简单配置快速生成超酷炫 GUI!

中康控股开启招股:拟募资净额3.95亿港元,预计7月12日上市

Thinkpad VMware 安装虚拟机出现此主机支持 Intel VT-x,但 Intel VT-x 处于禁用状态(问题解决方法)

go-zero微服务实战系列(七、请求量这么高该如何优化)
随机推荐
微信小程序:(更新)云开发微群人脉
MySQL数据库:分区Partition
How goby exports scan results
Source code migration from X86 platform to Kunpeng platform based on Kunpeng development kit [play with Huawei cloud]
win10安装Monggodb的基本使用教程
Thinkpad VMware 安装虚拟机出现此主机支持 Intel VT-x,但 Intel VT-x 处于禁用状态(问题解决方法)
Installation and removal of cover for CPU protection on desktop motherboard
College girls wear cheongsam to defend! Netizen: the tutor said it would be nice if the paper were as beautiful as the cheongsam
goby如何导出扫描结果
Appkey when applying for offline packaging of uniapp
留给比亚迪的时间还有三年
如何优雅的写 Controller 层代码?
Open source machine learning platform
PHP FPM startup parameters and important configuration details
Application of ansvc reactive power compensation device in a shopping mall in Hebei
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
Wechat applet: repair collection interface version cloud development expression package
Follow me study hcie big data mining Chapter 1 Introduction to data mining module 2
微信小程序:云开发表白墙微信小程序源码下载免服务器和域名支持流量主收益
Teach you how to install the latest version of mysql8.0 database on windows, nanny level teaching