从Kubernetes的私人注册表中抽出图像 [英] Pulling images from private registry in Kubernetes

查看:162
本文介绍了从Kubernetes的私人注册表中抽出图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经建立了运行在CoreOS上的多容器荚的4节点kubernetes群集。图像来自公共和私人存储库。现在我必须登录到每个节点,并在每次更新它们时手动下拉图像。我想要能够自动拉出来。


  1. 我已经尝试在每个服务器上运行docker登录,并将.dockercfg文件放在/ root和/ core

  2. 我也用.docker / config.json

  3. 做了上面的工作我已经向kube master添加了秘密,并添加了imagePullSecrets :


    • name:docker.io到Pod配置文件。


当我创建pod时,我收到错误消息错误:

  image< user / image>:最新未找到

如果我登录并运行docker拉会拉扯图像。我已经尝试过使用docker.io和quay.io。

解决方案

Kubernetes支持一种特殊类型的秘密,你可以创建将用于为您的pod获取图像。更多详细信息: http://kubernetes.io/ v1.0 / docs / user-guide / images.html#specified-imagepullsecrets-on-a-pod


I have built a 4 node kubernetes cluster running multi-container pods all running on CoreOS. The images come from public and private repositories. Right now I have to log into each node and manually pull down the images each time I update them. I would like be able to pull them automatically.

  1. I have tried running docker login on each server and putting the .dockercfg file in /root and /core
  2. I have also done the above with the .docker/config.json
  3. I have added secret to the kube master and added imagePullSecrets:
    • name: docker.io to the Pod configuration file.

When I create the pod i get the error message Error:

image <user/image>:latest not found

If I log in and run docker pull it will pull the image. I have tried this using docker.io and quay.io.

解决方案

Kubernetes supports a special type of secret that you can create that will be used to fetch images for your pods. More details here: http://kubernetes.io/v1.0/docs/user-guide/images.html#specifying-imagepullsecrets-on-a-pod

这篇关于从Kubernetes的私人注册表中抽出图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆