Pod 状态 ImagePullBackOff 或者 ErrImagePull,describe 里的 Events 有具体原因。

kubectl describe pod 名字 | grep -A5 Events

manifest unknown / not found

镜像名或者 tag 写错。latest 标签最容易出问题,生产固定版本号。私有仓库还要写全路径 harbor.local/library/nginx:1.24。

unauthorized / authentication required

仓库要登录。建 secret 并在 Pod 里引用:

kubectl create secret docker-registry regcred \
  --docker-server=harbor.local \
  --docker-username=admin --docker-password=xxx
spec:
  imagePullSecrets:
  - name: regcred

timeout / i/o timeout

节点拉不到仓库。在节点上用 crictl pull 试,能复现就是网络或者证书问题。自签证书要配 insecure_skip_verify。

x509 certificate

节点不信任仓库证书。把 CA 放到 /etc/containerd/certs.d/仓库域名/ca.crt,或者配置跳过校验。

确认是不是节点问题

kubectl get pod -o wide

只有某一台节点拉不到,其他节点正常,就是那台节点的运行时配置问题。