简体   繁体   English

Kubernetes在调度Pod时显示Image Pull Error

[英]Kubernetes showing Image Pull Error while scheduling pods

I have configured a secret on Kubernetes and inside the node, I am able to pull an image with docker pull perfectly. 我已经在Kubernetes上以及节点内部配置了一个秘密,我能够使用docker pull完美地拉取映像。 But when kubectl tries to schedule a pod on the node it shows image pull backoff error. 但是,当kubectl尝试在节点上调度pod时,它会显示图像回退错误。 Is there any setting needs to be done while bootstrapping. 引导时是否需要进行任何设置。 I am using community AMI on AWS for Kubernetes node. 我正在AWS上为Kubernetes节点使用社区AMI。

Try this: 尝试这个:

  1. kubectl describe pod-name - see event log at the end. kubectl describe pod-name参见最后的事件日志。 it should show series of events starting from initial image pull to subsequent attempts and may continue to restart in order to achieve desired state as per deployment record 它应显示从初始映像拉取到后续尝试的一系列事件,并可能继续重新启动,以根据部署记录达到所需状态
  2. In most scenarios something within container erroring out resulting restart expected behavior by k8s. 在大多数情况下,容器中的某些错误会导致k8s重新启动预期行为。 to check logs - kubectl logs pod-name 检查日志kubectl logs pod-name
  3. Try to keep container running so you can peek inside running container for more troubleshooting using kubectl exec -it pod-name (if single container) or kubectl exec -it pod-name -c container-name . 尝试保持容器运行,以便可以使用kubectl exec -it pod-name (如果是单个容器)或kubectl exec -it pod-name -c container-name来查看运行中的容器以进行更多故障排除。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM