docker - 创建 Pod 时图像拉取失败
问题描述
只是在本地机器上测试。Windows 7 x64、Minikube 1.14、docker 工具箱。
$docker image ls
确实显示了我想使用的图像。
REPOSITORY myname/hello-service
TAG 0.0.6
IMAGE ID xxxxxxxxxxx
在我的 Pod yaml 中:
spec:
containers:
-name: my-pod
image: myname/hello-service:0.0.6
运行后$kubectl create -f pod.yaml
。它失败了
Error: ImagePullBackOff
Failed to pull image "xxxxx" rpc error: code = ... manifest for myname/hello-service:0.0.6 not found
但是以前的版本 :0.0.5 工作得很好。
这两个图像都是在我的机器上构建的,并存储在 docker 的“默认”中。
解决方案
可能myname/hello-service:0.0.6
仅在您的Windows主机上吗?如果是这样,minikube 找不到它。
您可以在 Minikube 中访问一些选项。其中之一是使用 minikube 的 Docker 守护程序构建本地映像。另一个是运行一个私有的本地 Docker 注册表。
我发现的一些例子和更多例子[这里描述得很好]。(https://www.edureka.co/community/17481/local-docker-image-on-minikube)
推荐阅读
- python - ValueError:int() 的无效文字,基数为 10:'fee_code'
- npm - Npm 缺少脚本:dev
- python - 如何使用 Selenium 登录 Yahoo Mail
- mysql - 在 SpringBoot 和 Angular 中使用枚举
- reactjs - 使用事件侦听器时状态保持不变
- python - 当没有 [] 或 () 明显存在时,它是 listcomps 或 genexps
- javascript - 这段代码有什么错误?javascript代码不起作用
- c# - Can an async method await multiple responses?
- r - 根据行号匹配值
- angular - 如何在 Angular 应用程序中显示一个简单的 abcjs 工作表?