首页/云/Kubernetes 速查/kubectl describe 查看资源详情与事件
kubectl 基础56 条

kubectl describe 查看资源详情与事件

展示资源的完整状态:副本数、容器状态、探针、挂载、条件(Conditions),末尾 Events 是排障的起点。

Kubernetes 速查云更新于 2026-10-12
用途排查 Pod 调度、启动、探针与事件问题
语法kubectl describe <资源> <名称>

常用示例

常用示例
kubectl describe pod web-7d9c8b6f5c-abcde -n prod
kubectl describe node node-1 | grep -A6 Conditions
kubectl describe svc web | grep -A8 Endpoints
kubectl describe pvc data-0 -n prod

Events 关注点

Events 关注点
Reason 字段:FailedScheduling / FailedMount / BackOff / Unhealthy / FailedCreate
看 From(谁报的)与 Message(具体原因),配合 kubectl get events --sort-by=.lastTimestamp
describe 不显示容器 stdout/stderr;容器日志用 kubectl logs(含 --previous)。

易错点

  • Events 默认只保留最近一段时间的记录,重要故障尽快取;事件属于命名空间,注意 -n
  • describe node 的 Conditions 与 Allocatable 是调度判断依据,Requests 汇总在 Allocated resources 段

数据来源与参考

  • Kubernetes 官方文档 · kubectl describe
​‌‌​​‌​​​‌‌​‌‌‌‌​‌‌​​​‌‌​‌‌‌​​‌‌​​‌​‌‌‌​​‌‌‌​​​‌​‌‌​‌​​‌​‌‌‌​​​‌​‌‌​‌​​‌​‌‌​​​‌‌​‌‌‌​‌​​​‌‌​‌‌‌‌​​‌​‌‌‌​​‌‌​​​‌‌​‌‌​‌‌‌‌​‌‌​‌‌​‌