在docker服务器上添加新的镜像后想在rancher中部署运行,通过docker image ls可以看到镜像存在,但是在通过rancher添加部署的时候却出现以下错误。

    Failed to pull image "data-center-catalog:latest": rpc error: code = Unknown desc = Error response from daemon: pull access denied for data-center-catalog, repository does not exist or may require 'docker login'

系统没有找到镜像,检查yaml文件发现rancher默认使用了以下配置

      - image: data-center-catalog:latest
        imagePullPolicy: Always
        name: data-center-catalogtest
imagePullPolicy标识总是从远程拉取镜像,但是我没有使用镜像服务,所以这里改为  IfNotPresent
- image: data-center-catalog:latest
        imagePullPolicy: IfNotPresent
        name:data-center-catalogtest

意思是如果监测到本地存在此镜像就不从远程拉取,删除现有pod重新添加pod成功部署

 

或者在配置部署的时候在  安全/主机设置 中修改镜像拉取策略 为 不存在则拉取

Rancher 运行本地的镜像文件

 

相关文章:

  • 2021-12-25
  • 2021-10-23
  • 2022-12-23
  • 2021-12-03
  • 2022-01-23
  • 2021-07-25
  • 2022-12-23
  • 2022-01-01
猜你喜欢
  • 2021-06-22
  • 2022-12-23
  • 2021-08-28
  • 2021-12-31
  • 2022-12-23
  • 2022-12-23
  • 2022-02-15
相关资源
相似解决方案