Quickly build kubernetes clusters using rancher and private warehouses

Source: Internet
Author: User
Tags k8s kubernetes deployment

Come on , the first question:Rancher can quickly deploy kubernetes, but its use of the Gcr.io on the mirror cannot download what to do? With rancher you can quickly deploy kubernetes, but what images do we need to download? Rancher Support Private Image warehouse, how to set it?

Problem Solving Ideas:

Although the domestic network does not have direct access to the Gcr.io server, it has access to the hub.docker.com mirror repository and hub.docker.com can access the Gcr.io server. Using this feature, and Hub.docker.com's own "Create Automated Build" feature, read the custom dockerfile file on the github.com code base and automatically create the Google image needed to deploy kubernetes. Then set up the Kubernetes template in rancher, let our server go to hub.docker.com in the private warehouse to pull the mirror. This completes the entire Kubernetes deployment process.

1: What if the image on Google server Gcr.io is inaccessible?

"How to get Kubernetes mirroring" http://blog.csdn.net/shida_csdn/article/details/78480241 This document and the illustrated illustrations are very clearly explained.

Question 2: Which mirrors are required to quickly deploy kubernetes using rancher?

List of mirrors required for Rancher v1.6.14 deployment k8s1.8.5 http://blog.csdn.net/CSDN_duomaomao/article/details/79127856 , this article takes version 1.6.14 as an example.

Special Note:

1, RANCHER_CN Head of the image, tiller this image is very special, it is Kubernetes deployment Tool Helm service-side components, the original image full name is Gcr.io/kubernetes-helm/tiller:v2.6.1,rancher China The private warehouse image name is:

registry.cn-shenzhen.aliyuncs.com/rancher_cn/tiller:v2.6.1

The contents of the Tiller/v2.6.1/dockerfile file in my private code library on GitHub are:

From Gcr.io/kubernetes-helm/tiller:v2.6.1

Maintainer [email protected]

2. The other image prefixes are gcr.io/google_containers/:

REGISTRY.CN-SHENZHEN.ALIYUNCS.COM/RANCHER_CN/PAUSE-AMD64 3.0

Registry.cn-shenzhen.aliyuncs.com/rancher_cn/kubernetes-dashboard-amd64 v1.8.0

Registry.cn-shenzhen.aliyuncs.com/rancher_cn/k8s-dns-sidecar-amd64 1.14.5

Registry.cn-shenzhen.aliyuncs.com/rancher_cn/k8s-dns-kube-dns-amd64 1.14.5

Registry.cn-shenzhen.aliyuncs.com/rancher_cn/k8s-dns-dnsmasq-nanny-amd64 1.14.5

Registry.cn-shenzhen.aliyuncs.com/rancher_cn/heapster-influxdb-amd64 v1.3.3

Registry.cn-shenzhen.aliyuncs.com/rancher_cn/heapster-grafana-amd64 v4.4.3

Registry.cn-shenzhen.aliyuncs.com/rancher_cn/heapster-amd64 v1.4.0

The contents of the Pause-amd64/3.0/dockerfile file in my private code library on GitHub are:

From gcr.io/google_containers/pause-amd64:3.0

maintainer [email protected]

The rest of the Heapster and k8s also have the same image, Dockerfile file is very simple, is to directly refer to the image on Gcr.io.

......

How do I set up a private warehouse in question 3:rancher?

"Rancher China Accelerated installation Kubernetes" https://anjia0532.github.io/2017/11/13/rancher-k8s-china/

Rancher Kubernetes Template Setup essentials:

Private Registry for add-ons and Pod Infra Container Image index.docker.io

Image namespace for add-ons and Pod Infra Container Image Dockermaomao

Image namespace for Kubernetes-helm image Dockermaomao

Pod Infra Container Image Dockermaomao

Run:

01-github Content

02-Automatic creation of one of the mirrors settings (PAUSE-AMD64)

02-Automatic creation of one of the mirrors settings (KUBERNETES-DASHBOARD-AMD64)

03-How to generate an auto-create image

03-How to generate an auto-create image 2

03-How to generate an auto-create image 3

03-How to generate an auto-create image 4

04-automatically created after Dockerhub mirrored warehouse content

04-automatically created after Dockerhub mirrored warehouse content 2

Kubernetes template environment settings in 05-rancher-Key 4 parameters

06-After deploying Kubernetes using rancher, the panel shows that the image of the private warehouse is used

01-github Content

02-Automatic creation of one of the mirrors settings (PAUSE-AMD64)

02-Automatic creation of one of the mirrors settings (KUBERNETES-DASHBOARD-AMD64)

03-How to generate an auto-create image

03-How to generate an auto-create image 2

03-How to generate an auto-create image 3

03-How to generate an auto-create image 4

04-automatically created after Dockerhub mirrored warehouse content

04-automatically created after Dockerhub mirrored warehouse content 2

Kubernetes template environment settings in 05-rancher-Key 4 parameters

06-After deploying Kubernetes using rancher, the panel shows that the image of the private warehouse is used

Reference Links:

To get the Kubernetes image:

http://blog.csdn.net/shida_csdn/article/details/78480241

Rancher v1.6.14 The list of mirrors required to deploy k8s1.8.5:

http://blog.csdn.net/CSDN_duomaomao/article/details/79127856

Rancher China accelerated installation kubernetes:

https://anjia0532.github.io/2017/11/13/rancher-k8s-china/

Rancher Installing Kubernetes:

https://anjia0532.github.io/2017/11/10/rancher-k8s/

GitHub code for this article:

Https://github.com/colindaddy/googlecontainer

The Dockerhub Image Library for this article:

https://hub.docker.com/u/dockermaomao/

Quickly build kubernetes clusters using rancher and private warehouses

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.