[英]Getting ImagePullBackOff on EC2 instance while creating Kubernetes pods
I have deployed simple react app on kubernetes through docker-desktop successfully.我已经通过 docker-desktop 在 kubernetes 上成功部署了简单的反应应用程序。 It was having only one master there.
那里只有一位主人。 Now I am doing the same thing on AWS Ubuntu EC2 Instance, its having one master and two slave nodes, all are connected properly.
现在我在 AWS Ubuntu EC2 实例上做同样的事情,它有一个主节点和两个从节点,都连接正确。 Also a demo Nginx server is already deployed successfully on my master EC2 instance.
此外,演示 Nginx 服务器已经成功部署在我的主 EC2 实例上。
I am getting ImagePullBackOff status on React deployment/service.我在 React 部署/服务上获得 ImagePullBackOff 状态。 Is there any configuration I have to make in EC2 to make it work.
我必须在 EC2 中进行任何配置才能使其工作。 How can I debug the things and what could be the reasons for same.
我该如何调试这些东西,以及可能是什么原因。
I have followed these guides and you can assume my deployment and service.yml file to be same as provided in these links.我已遵循这些指南,您可以假设我的部署和 service.yml 文件与这些链接中提供的相同。
https://dev.to/rieckpil/deploy-a-react-application-to-kubernetes-in-5-easy-steps-516j https://dev.to/rieckpil/deploy-a-react-application-to-kubernetes-in-5-easy-steps-516j
https://stackoverflow.com/a/37306838/9465933 https://stackoverflow.com/a/37306838/9465933
I am pushing the pods to local docker registry.我正在将 pod 推送到本地 docker 注册表。 Is there any docker secret config's are required for this?
是否需要任何 docker 秘密配置? Any help will be highly appreciated.
任何帮助将不胜感激。
If you expand on the logs with kubectl describe
, you will probably notice that the error is that Kubernetes cannot fetch the image from the registry.如果您使用
kubectl describe
扩展日志,您可能会注意到错误是 Kubernetes 无法从注册表中获取图像。
This is due to two things:这是由于两件事:
You need to create a secret to access your registry.您需要创建一个秘密来访问您的注册表。 https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
You said to have a local registry.你说有一个本地注册表。 Is it publicly reachable?
是否可以公开访问? Notice that the EC2 instances need to be able to access it.
请注意,EC2 实例需要能够访问它。 So check port-forwarding, firewall configuration, etc in your LAN.
因此,请检查 LAN 中的端口转发、防火墙配置等。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.