从Kubernetes的私人注册表中抽出图像

编程入门 行业动态 更新时间:2024-10-24 06:24:20
本文介绍了从Kubernetes的私人注册表中抽出图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我已经建立了运行在CoreOS上的多容器荚的4节点kubernetes群集。图像来自公共和私人存储库。现在我必须登录到每个节点,并在每次更新它们时手动下拉图像。我想要能够自动拉出来。

  • 我已经尝试在每个服务器上运行docker登录,并将.dockercfg文件放在/ root和/ core
  • 我也用.docker / config.json
  • 做了上面的工作我已经向kube master添加了秘密,并添加了imagePullSecrets :
    • name:docker.io到Pod配置文件。
  • 当我创建pod时,我收到错误消息错误:

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

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

    解决方案

    Kubernetes支持一种特殊类型的秘密,你可以创建将用于为您的pod获取图像。更多详细信息: 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.

  • I have tried running docker login on each server and putting the .dockercfg file in /root and /core
  • I have also done the above with the .docker/config.json
  • 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: kubernetes.io/v1.0/docs/user-guide/images.html#specifying-imagepullsecrets-on-a-pod

    更多推荐

    从Kubernetes的私人注册表中抽出图像

    本文发布于:2023-11-02 08:25:03,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1551886.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:注册表   图像   私人   Kubernetes

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!