GithubHelp home page GithubHelp logo

eightpigs / proxy_registry_k3s Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 2.0 4 KB

Quick build [proxy] registry on K3s. (k8s-gcr.io, gcr.io ... ) 一键解决 gcr.io 访问不了的问题。

Dockerfile 7.20% Shell 92.80%
k3s docker-registry-v2

proxy_registry_k3s's Introduction

registry on k3s

快速在 K3s 上运行代理仓库,主要用于解决 gcr.io、k8s-gcr.io 等仓库访问不了的问题。

说明

  • 该仓库内容参考了 云原生实验室 的博客: Docker 镜像加速教程,感谢该博客提供的完善教程。
  • 默认使用了 云原生实验室 打包好的镜像: yangchuansheng/registry-proxy:latest,可自行使用 Dockerfile, entrypoint 打包出自己的镜像

使用

  1. 拥有一台可以访问 gcr.io, k8s-gcr.io... 并且有公网 IP 的机器

  2. 在机器上拉取本仓库: git clone https://github.com/eightpigs/proxy_registry_k3s

  3. 根据代理情况修改 run.sh 的前几行配置,默认创建 hub.docker.io, gcr.io, k8s-gcr.io 3个代理

    如果要代理 hub.docker.io 请自行更换以下信息:

    • UserName : pod-hub-registry.yaml:72
    • Password: pod-hub-registry.yaml:74
  4. 运行: ./run.sh,运行结束后会有如下输出表示相关仓库配置成功:

hub-k3s.io => HTTP/1.1 200 OK
gcr-k3s.io => HTTP/1.1 200 OK
k8s-gcr-k3s.io => HTTP/1.1 200 OK
  1. 使用 ansible 对自有 K3s 集群的所有节点配置代理

    • 记得在 $ANSIBLE_INVENTORY 中配置 k3s 相关 hosts
    • 运行过程中,会询问 第一步 服务器的公网IP,填入即可
  ansible-playbook ansible-add-registry.yaml -K
  1. Enjoy it

proxy_registry_k3s's People

Contributors

eightpigs avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.