安装 RKE 所需资源:
- RKE 二进制文件,默认:https://github.com/rancher/rke
- RKE 依赖的容器镜像,默认:docker.io
使用国内资源安装 RKE 集群
从 Rancher Releases Mirror 获取 rke 二进制文件。
cat > cluster.yml <<EOL
nodes:
- address: 192.168.205.110
user: ubuntu
role:
- controlplane
- etcd
- worker
- address: 192.168.205.107
user: ubuntu
role:
- worker
private_registries:
- url: registry.cn-hangzhou.aliyuncs.com
is_default: true
EOL
通过 url
和 is_default
设置系统镜像从 registry.cn-hangzhou.aliyuncs.com
拉取镜像。
rke up --config cluster.yml
INFO[0000] Running RKE version: v1.4.5
INFO[0000] Initiating Kubernetes cluster
INFO[0000] [dialer] Setup tunnel for host [192.168.205.110]
INFO[0000] [dialer] Setup tunnel for host [192.168.205.107]
INFO[0001] Finding container [cluster-state-deployer] on host [192.168.205.110], try #1
INFO[0001] Pulling image [registry.cn-hangzhou.aliyuncs.com/rancher/rke-tools:v0.1.88] on host [192.168.205.110], try #1
...
...
...