如何使用国内资源安装 rke

安装 RKE 所需资源:

使用国内资源安装 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

通过 urlis_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
...
...
...

很多镜像下不到了,
docker pull registry.cn-hangzhou.aliyuncs.com/rancher/rke-tools:v0.1.88
Trying to pull repository registry.cn-hangzhou.aliyuncs.com/rancher/rke-tools
Pulling repository registry.cn-hangzhou.aliyuncs.com/rancher/rke-tools
Error: image rancher/rke-tools:v0.1.88 not found

太老的镜像,阿里云镜像仓库可能会缺失