You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Mac环境下Minikube拉取本地镜像遇manifest unknown问题求助

问题:Minikube无法拉取本地Docker Registry镜像

在Mac环境下使用Minikube、Docker、Helm和本地Docker Registry,通过Helm安装应用时出现以下错误:

Failed to pull image "127.0.0.1:5000/hello-world:v1.0": rpc error: code = Unknown desc = Error response from daemon: manifest for 127.0.0.1:5000/hello-world:v1.0 not found: manifest unknown: manifest unknown

部署配置

spec:
    containers:
      - name: hello-world
        image: 127.0.0.1:5000/hello-world:v1.0
        imagePullPolicy: IfNotPresent
        ports:
          - name: http
            containerPort: 5000
            protocol: TCP

本地验证结果

本地执行拉取镜像命令可正常完成:

$docker pull 127.0.0.1:5000/hello-world:v1.0

v1.0: Pulling from hello-world
Digest: sha256:0534fcc8d406574f7def33e726f0e476ce94866e21d8cbd6ed4c273de113e9d3
Status: Image is up to date for 127.0.0.1:5000/hello-world:v1.0
127.0.0.1:5000/hello-world:v1.0

通过curl检查镜像manifest也存在:

$curl -X GET 127.0.0.1:5000/v2/hello-world/manifests/sha256:0534fcc8d406574f7def33e726f0e476ce94866e21d8cbd6ed4c273de113e9d3

{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
   "config": {
      "mediaType": "application/vnd.docker.container.image.v1+json",
      "size": 8102,
      "digest": "sha256:49188cd9fa7002b28391f01ba5c0ce4328cc467abeb6743d181cbe1a3a2fd37c"
   },
   ...
}

执行的操作步骤

  • docker run -d -p 5000:5000 --restart=always --name registry registry:2
  • docker build . -t hello-world:v1.0
  • docker tag hello-world:v1.0 127.0.0.1:5000/hello-world:v1.0
  • docker push 127.0.0.1:5000/hello-world:v1.0
  • helm install hello-world ./hello-world

解决方案

  1. 修改Pod/部署清单中的镜像地址为 host.minikube.internal:5000/hello-world:v1.0
  2. 执行命令删除现有Minikube集群:minikube delete
  3. 使用以下命令重新启动Minikube,指定不安全注册表:
minikube start --insecure-registry="host.minikube.internal:5000"

内容的提问来源于stack exchange,提问作者chutcher

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.12 03:25:22