Best practices for deploying Rancher v2.x and Rancher provisioned Kubernetes clusters in China

Table of Contents


Users might experience a slow or unstable connection to GitHub and Docker Hub from China. As a result, Rancher Docker images and catalogs should be configured to use the Alibaba Cloud Docker image registry and Gitee git repositories, when deploying Rancher and downstream clusters within China. This article details how to configure these in Rancher Kubernetes Engine (RKE) CLI or Rancher v2.x provisioned clusters.


Configure the Alibaba Cloud Docker image repository for installation of Rancher v2.x

A single Docker container installation of Rancher

Specify the repository URL in the docker run command, e.g.:

docker run -itd -p 80:80 -p 443:443 \
    --restart=unless-stopped \

A Highly Available (HA) installation of Rancher in a Kubernetes cluster

Specify private_registries in the RKE configuration file (cluster.yaml), e.g.:

  - address: x.x.x.x
    internal_address: y.y.y.y
    user: ubuntu
    role: [controlplane,worker,etcd]
     - url:
       is_default: true

Helm v2 installation only

Specify the tiller-image for tiller initialisation. e.g.:

helm init --service-account tiller --tiller-image<tag>

The list of tiller image tags are available here.

Downstream clusters

Configure the system-default-registry for Rancher, setting the value to, per the following example:


Configure the Gitte git repository for Rancher App catalogs

Having installed Rancher, replace the default catalog URLs with the equivalent Gitee URLs, per the following table:

Rancher Catalog URL Rancher GitHub URL Rancher Gitee URL
Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.