GithubHelp home page GithubHelp logo

repimage's Introduction

repimage

很多镜像都在国外。国内下载很慢,需要加速,每次都要手动修改yaml文件中的镜像地址,很麻烦。这个项目就是为了解决这个问题。

用于替换k8s中一些在国内无法访问的镜像地址,替换的镜像地址在 public-image-mirror 中查看

快速上手

安装

git clone https://github.com/shixinghong/repimage.git
cd repimage 
kubectl apply -f  yaml/webhook.yaml ## 一定要先安装webhook的服务 ready之后再安装admission
kubectl apply -f  yaml/admission.yaml

卸载

kubectl delete -f  yaml/webhook.yaml -f yaml/admission.yaml

使用后效果

自动替换yaml文件中的镜像地址,例如:

k8s.gcr.io/coredns/coredns => m.daocloud.io/k8s.gcr.io/coredns/coredns

nginx => m.daocloud.io/docker.io/library/nginx

注意事项:

  • 只有在 public-image-mirror 中的地址才会被替换,否则不会被替换
  • 替换的方式是增加前缀方式,不是替换方式
  • 目前只支持在amd64架构下的镜像替换,如果需要可以自行编译打包是使用

License

Apache-2.0

特别感谢

  • DaoCloud免费提供的镜像代理服务

repimage's People

Contributors

shixinghong avatar

Stargazers

Ryan Tan avatar  avatar  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.