How to obtain a Kubernetes image in China

Source: Internet
Author: User

How to obtain a Kubernetes image in China

I. background

As we all know, due to domestic network reasons, when building a Kubernetes environment, we often encounter situations where necessary images cannot be found. After all, it is not a good way to pick up junk in DockerHub. This article will teach you how to build your own image repository in DockerHub.

Requirement: You have a GitHub account and a DockerHub account. If not, register.

Ii. Basic Steps

2.1 log on to GitHub and create a code repository, such as googleiner iner.

2.2 clone code (replace the address with yours)

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

2.3 compile Dockerfile (take dashboard as an example)

# Cd googleiner iner
# Mkdir dashboard
# Cd dashboard
# Vim Dockerfile

FROM gcr. io/google_containers/kubernetes-dashboard-amd64: v1.7.1
MAINTAINER qiushida@buaa.edu.cn

2.4 submit code

# Cd <clone code root directory>
# Git add.
# Git commit-m "kubernetes-dashboard-amd64: v1.7.1"
# Git push

2.5 code structure after the final submission is complete

2.6 log on to DockerHub and create an automatic Build project

If no account is associated, you will be prompted to bind the github account and follow the prompts.

If github has been bound, select the github-based Automatic Build project,

Follow the prompts and select our project googleiner iner on github. Set the repository name to dashboard.

2.7 configure Build Settings

Specify the directory where Dockerfile is located (to the directory level), set the Image tag, click Save Changes, and then click Trigger

2.8 check the compilation progress in Build Details

2.9 After compilation, we can pull the image locally.

Change the tag is gcr. io/google_containers/kubernetes-dashboard-amd64: v1.7.1 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

CentOS 7.3 use kubeadm to install Kubernetes 1.7.3 full version

This article permanently updates link: https://www.bkjia.com/Linux/2018-02/151015.htm

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.