我正在尝试运行示例云的1.0.1.RELEASE版本,但在minikube和gcloud中都失败了,并显示以下错误:无法从注册表中拉出镜像‘https://github.com/spring-cloud/spring-cloud-kubernetes/tree/master/spring-cloud-kubernetes-examples/kubernetes-hello-world-example /kubernetes-hello-world:1.0.1.RELEASE’。
我首先在Kubernetes in Action中使用了示例kubia.它在minikube和gcloud中都可以运行。
在示例自述文件中有一个关于执行器健康路径问题的警告,我知道如何通过在kubectl中进行编辑来修复它,但这并没有帮助。
这表明在docker中找不到该图像。我已经运行了'gcloud auth configure- docker‘来配置本地docker到gcloud。构建'mvn fabric8 8:deploy -Pkubernetes‘似乎工作正常,有一些非致命的javadoc错误:
[INFO] Creating a Deployment from kubernetes.yml namespace default name kubernetes-hello-world
[INFO] Created Deployment: spring-cloud-kubernetes-examples/kubernetes-hello-world-example/target/fabric8/applyJson/default/deployment-kubernetes-hello-world-2.json
[INFO] F8: HINT: Use the command `kubectl get pods -w` to watch your pods start up
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS图像似乎出现在docker中
stephens-MacBook-Pro:kubernetes-hello-world-example stephen$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
cloud/kubernetes-hello-world 1.0.1.RELEASE 1b71ed3f02fb 10 minutes ago 464MBkubectl get pods -w返回
kubernetes-hello-world-984b55c69-8t2qg 0/1 ErrImagePull 0 3m19s
kubernetes-hello-world-984b55c69-8t2qg 0/1 ImagePullBackOff 0 3m30s发布于 2020-07-04 15:11:16
您的状态为"ErrImagePull“,它描述了pod的状态,尝试执行kubectl describe PODNAME -n NSNAME命令,然后查看完整的描述。然后你就可以知道发生了什么。也许您可以找到镜像名称并手动拉取它:docker search IMAGENAME on your worker node:docker pull IMAGENNAME:TAG如果失败,则该镜像可能已被删除。任何情况下,您都需要提供更多信息。
https://stackoverflow.com/questions/56404102
复制相似问题