【问题标题】:Kubernetes cannot pull image from public docker image repositoryKubernetes 无法从公共 docker 镜像仓库拉取镜像
【发布时间】:2020-06-03 10:30:13
【问题描述】:

我正在尝试按照文档 here 部署一个 go 应用程序:

我已按照文档中的步骤操作,但第 5 步出现错误。安装后运行

Helm install RELEASE-NAME ./helm-chart/MYAPP

我尝试运行 kubectl get pods,但是没有一个 pod 准备好。

运行后

kubectl get pods

所有列出的 pod 的状态都是 ImagePullBackOff。

我尝试运行 kubectl describe pod ,但出现以下错误:

Failed to pull image "mantissaa/todo-app": rpc error: code = Unknown desc = Error response from daemon: manifest for mantissaa/todo-app not found: manifest unknown: manifest unknown

我不确定需要指定哪些其他细节。这是我尝试部署的 docker hub 存储库:https://hub.docker.com/repository/docker/mantissaa/todo-app/tags?page=1

【问题讨论】:

  • 如果您没有标签,则默认为latest,该标签页上没有列出。你的意思是image: mantissaa/todo-app:0.1.0?您可以编辑问题以包含minimal reproducible example吗?
  • 你能运行helm install RELEASE-NAME ./helm-chart/MYAPP --set image.tag=0.1.0吗?

标签: docker kubernetes


【解决方案1】:

Docker 默认尝试使用latest 标签。 根据您的私人 docker 存储库,您没有在那里定义它。相反,您只有0.1.0 标签。

docker pull mantissaa/todo-app
Using default tag: latest
Error response from daemon: manifest for mantissaa/todo-app:latest not found: manifest unknown: manifest unknown


docker pull mantissaa/todo-app:0.1.0
0.1.0: Pulling from mantissaa/todo-app
e7c96db7181b: Pull complete
a9b145f64bbe: Pull complete
3bcb5e14be53: Pull complete
1e6514cfa19a: Pull complete
fa28cb68c53c: Pull complete
064046777741: Pull complete
15442420c7af: Pull complete
Digest: sha256:b8327ea3eff41068eaa0d48c47687ef386e9f5de342758cca1f6735d53fc504a
Status: Downloaded newer image for mantissaa/todo-app:0.1.0
docker.io/mantissaa/todo-app:0.1.0

因此您可能希望将 Image 标签更新为 latest 或在 helm 中指定 0.1.0 标签

【讨论】:

    猜你喜欢
    • 2022-08-09
    • 2020-09-16
    • 1970-01-01
    • 1970-01-01
    • 2018-11-16
    • 1970-01-01
    • 2018-01-15
    • 2023-04-03
    • 2023-02-01
    相关资源
    最近更新 更多