首页 > 解决方案 > Kubernetes 种类无法提取图像

问题描述


kind用来在我的本地设置 kubernetes 集群我已经redis:5.0.7通过使用下面的命令加载图像到 kind, kind load docker-image redis:5.0.7 --name kind这是第一次它给了我成功
,现在它无法在部署 pod 时拉/加载该图像。下面是我的 pod 定义

apiVersion: v1
kind: Pod
metadata:
  name: redis-pod
  labels:
    app: redis
spec:
  containers:
    - name: redis-ctr
      image: reids:5.0.7
      imagePullPolicy: IfNotPresent


我得到以下错误

Warning  Failed     4s    kubelet, kind-control-plane  Failed to pull image "reids:5.0.7": rpc error: code = Unknown desc = failed to pull and unpack image "docker.io/library/reids:5.0.7": failed to resolve reference "docker.io/library/reids:5.0.7": pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

当我为我的自定义图像尝试类似的步骤时,它可以工作,但对于 redis,insufficient_scope: authorization failed
即使在实物文档中也提到,当您在将图像加载到实物时没有提及集群名称但我提供了正确的名称时,会出现此问题,
有人可以帮帮我吗?
谢谢

标签: kubernetes

解决方案


我猜你放错了图片

 reids:5.0.7

redis:5.0.7

推荐阅读