[Kubernetes] Methods of obtaining kubernetes mirrors in China

Source: Internet
Author: User
Tags git clone

I. Background INTRODUCTION

As we all know, due to the domestic network reasons, in the construction of kubernetes environment, often encountered the need for the mirror can not find the situation.

After all, it is not a good idea to pick up rubbish in Dockerhub, this article teaches everyone to build their own mirror warehouse in Dockerhub.

Request: Have GitHub account number, have dockerhub account number, do not register.

Second, the basic steps

2.1 Login GitHub, create code warehouse, such as: Googlecontainer

2.2 Cloning code (address for your)

# git clone https://github.com/SataQiu/googlecontainer.git

2.3 Writing Dockerfile (take dashboard as an example)

# CD Googlecontainer
# mkdir Dashboard
# CD Dashboard
# Vim Dockerfile
From gcr.io/google_containers/kubernetes-dashboard-amd64:v1.7.1
maintainer qiushida@buaa.edu.cn

2.4 Submitting Code

# cd < clone code root directory >
# git Add.
# git commit-m "kubernetes-dashboard-amd64:v1.7.1"
# git push

2.5 The code structure after the final commit is completed

2.6 Login Dockerhub, create automated build project

If not associated with the account, will be prompted to bind GitHub account, as prompted to operate.

If the GitHub is bound, select the automated build project in GitHub mode, as shown in

Then follow the prompts, select GitHub on our project Googlecontainer can, the warehouse name set to Dashboard

2.7 Configuration Build Settings

Specify the directory in which Dockerfile is located (to the directory level), set the mirror tag, click Save Changes, and then click Trigger

2.8 In Build Details can view the compilation progress

2.9 After the compilation completes, we can pull the mirror to the local.

Change your own tag is gcr.io/google_containers/kubernetes-dashboard-amd64:v1.7.1 mirror image.

# Docker Pull shidaqiu/dashboard:v1.7.1
# docker tag shidaqiu/dashboard:v1.7.1 gcr.io/google_containers/ kubernetes-dashboard-amd64:v1.7.1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.