gpt4 book ai didi

docker - 无法从 minikube docker 中提取镜像

转载 作者:行者123 更新时间:2023-12-02 08:30:08 52 4
gpt4 key购买 nike

当我尝试在集群中运行容器时,我收到一条消息“已创建部署测试”,但是当我查看仪表板时,我可以看到它处于错误状态 (无法拉取镜像...,由于授权问题,无法从本地minikube docker env拉取镜像

我的步骤是:

  1. 使用 hyperv 启动 minikube 并将 --insecure-registry 开关设置为 10.0.0.0/8,也尝试过 0.0.0.0/0 - Kubernetes 版本 1.9.0 也尝试过 1.8.0<
  2. 通过 minikube docker-env | 将 docker env 设置为 minikube docker调用表达式
  3. 构建 docker 镜像 - 镜像构建并存在于 minikube 本地 docker 中
  4. kubectl run test --image test-service --port 1101

这是结果:

Failed Deployment

我错过了什么?

最佳答案

正如评论中所讨论的,openfaas/faas-netes问题 135 说明了类似的问题,并提到了可能的解决方案:

imagePullPolicy if not mentioned should have defaulted to Never instead of Always.

OP Tim Jarvis然后意识到:

I realized it was not an auth issue, but that it was always wanting to pull from an external repo.
The fix for me was to use the imagePullPolicy of IfNotPresent.

关于docker - 无法从 minikube docker 中提取镜像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48818237/

52 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com