首页/云/云与容器速查/ImagePullBackOff 镜像拉取失败
本包目录(340 条)

ImagePullBackOff 镜像拉取失败

kubelet 拉镜像失败后的退避状态:describe 的 Events 给出确切原因(401、tag 不存在、网络超时、证书)。私有仓库要先补 imagePullSecrets 或节点级认证。

云与容器速查云更新于 2026-10-12
对比ErrImagePull 是首次失败;ImagePullBackOff 是退避重试中
原因速查NotFound/unauthorized/timeout/x509/磁盘不足
私有仓库Pod 指定 imagePullSecrets: my-regcred
排查describe Events;节点上 crictl pull 镜像名直接复现
修复改 tag / 补 secret / 配镜像加速与证书

排查与修复

排查与修复
kubectl describe pod web-1 | grep -A5 "Failed\|Back-off"
kubectl get secret regcred -o jsonpath='{.type}'
kubectl patch deploy web -p '{"spec":{"template":{"spec":{"imagePullSecrets":[{"name":"regcred"}]}}}}'
imagePullSecrets 是命名空间级资源:每个环境/命名空间都要各自创建,别指望一处配置全局生效。

易错点

  • tag 写 latest 且被清理:拉不到才想起来不可变标签的重要性
  • secret 建在 default,工作负载在 dev:拉取认证始终失败

数据来源与参考

  • Kubernetes Docs:Images
  • Kubernetes Docs:Pull an Image from a Private Registry

相关工具

​‌‌​​‌​​​‌‌​‌‌‌‌​‌‌​​​‌‌​‌‌‌​​‌‌​​‌​‌‌‌​​‌‌‌​​​‌​‌‌​‌​​‌​‌‌‌​​​‌​‌‌​‌​​‌​‌‌​​​‌‌​‌‌‌​‌​​​‌‌​‌‌‌‌​​‌​‌‌‌​​‌‌​​​‌‌​‌‌​‌‌‌‌​‌‌​‌‌​‌