Rancher 中文文档

https://docs.rancher.cn/

4C 8G Centos7.7 3 master+2 node

文件下载地址
http://mirror.cnrancher.com/

1. 安装RKE工具

https://github.com/rancher/rke/releases
master节点01部署

1.1 下载RKE工具到本地

wget http://rancher-mirror.cnrancher.com/rke/v1.1.1/rke_linux-amd64
chmod +x rke_linux-amd64 && sudo mv rke_linux-amd64 /usr/bin/rke

1.2 查看当前RKE版本

rke —version

1.3 查看RKE支持的Kubernetes版本

rke config —list-version —all

1.4 查看RKE支持的image

rke config —system-images —all

  1. [root@rmaster01 ~]# rke config --system-images --all
  2. INFO[0000] Generating images list for version [v1.17.9-rancher1-1]:
  3. rancher/coreos-etcd:v3.4.3-rancher1
  4. rancher/rke-tools:v0.1.59
  5. rancher/k8s-dns-kube-dns:1.15.0
  6. rancher/k8s-dns-dnsmasq-nanny:1.15.0
  7. rancher/k8s-dns-sidecar:1.15.0
  8. rancher/cluster-proportional-autoscaler:1.7.1
  9. rancher/coredns-coredns:1.6.5
  10. rancher/k8s-dns-node-cache:1.15.7
  11. rancher/hyperkube:v1.17.9-rancher1
  12. rancher/coreos-flannel:v0.12.0
  13. rancher/flannel-cni:v0.3.0-rancher6
  14. rancher/calico-node:v3.13.4
  15. rancher/calico-cni:v3.13.4
  16. rancher/calico-kube-controllers:v3.13.4
  17. rancher/calico-ctl:v3.13.4
  18. rancher/calico-pod2daemon-flexvol:v3.13.4
  19. weaveworks/weave-kube:2.6.4
  20. weaveworks/weave-npc:2.6.4
  21. rancher/pause:3.1
  22. rancher/nginx-ingress-controller:nginx-0.32.0-rancher1
  23. rancher/nginx-ingress-controller-defaultbackend:1.5-rancher1
  24. rancher/metrics-server:v0.3.6

2. Docker环境准备

~~2.1 安装Docker ~~

  1. # step 1: 安装必要的一些系统工具
  2. sudo yum install -y yum-utils device-mapper-persistent-data lvm2
  3. # Step 2: 添加软件源信息
  4. sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
  5. # Step 3
  6. sudo sed -i 's+download.docker.com+mirrors.aliyun.com/docker-ce+' /etc/yum.repos.d/docker-ce.repo
  7. # Step 4: 更新并安装Docker-CE
  8. sudo yum makecache fast
  9. sudo yum -y install docker-ce
  10. # Step 4: 开启Docker服务
  11. sudo service docker start

2.2 锁定Docker版本

# 安装yum-plugin-versionlock插件
yum -y install yum-plugin-versionlock

# 锁定Docker软件包
yum versionlock add docker-ce-19.03.7-3.el7 docker-ce-cli-19.03.7-3.el7 containerd.io

# 查看已锁定的软件包
yum versionlock list

# 解锁指定软件包
yum versionlock delete <软件包名称>

#解锁所有软件包
yum versionlock clear

3. 系统内核调优

cat >> /etc/sysctl.d/kubernetes.conf<<EOF
# 开启路由功能
net.ipv4.ip_forward=1
# 避免cpu资源长期使用率过高导致系统内核锁
kernel.watchdog_thresh=30
# 开启iptables bridge
net.bridge.bridge-nf-call-iptables=1
# 调优ARP高速缓存
net.ipv4.neigh.default.gc_thresh1=4096
net.ipv4.neigh.default.gc_thresh2=6144
net.ipv4.neigh.default.gc_thresh3=8192
EOF
sysctl -p && systemctl restart docker

docker服务所有节点都部署
docker安装脚本

#! /bin/bash
#安装Docker
#定义用户名
NEW_USER=rancher
#添加用户(可选)
sudo adduser $NEW_USER
#为新用户设置密码
echo rancher | sudo passwd $NEW_USER --stdin
#为新用户添加sudo权限
sudo echo "$NEW_USER ALL=(ALL) ALL" >> /etc/sudoers
#安装必要的一些系统工具
sudo yum install vim wget bash-completion lrzsz nmap nc tree htop iftop net-tools -y
sudo yum install -y yum-utils device-mapper-persistent-data  lvm2 bash-completion
#添加Docker源信息
sudo yum-config-manager --add-repo \
    http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
#缓存docker源
sudo yum makecache
#安装docker
sudo yum -y install docker-ce docker-ce-cli containerd.io
#把当前用户加入docker组
sudo usermod -aG docker $NEW_USER
#设置开机自启并运行docker服务
sudo systemctl enable --now docker
#安装yum-plugin-versionlock插件
yum -y install yum-plugin-versionlock
#锁定Docker软件包
yum versionlock add docker-ce-19.03.7-3.el7 docker-ce-cli-19.03.7-3.el7 containerd.io
#关闭虚拟内存
swapoff -a
sed -i 's/.*swap.*/#&/' /etc/fstab
#系统内核调优
cat >> /etc/sysctl.d/kubernetes.conf<<EOF
# 开启路由功能
net.ipv4.ip_forward=1
# 避免cpu资源长期使用率过高导致系统内核锁
kernel.watchdog_thresh=30
# 开启iptables bridge
net.bridge.bridge-nf-call-iptables=1
net.bridge.bridge-nf-call-ip6tables = 1
# 调优ARP高速缓存
net.ipv4.neigh.default.gc_thresh1=4096
net.ipv4.neigh.default.gc_thresh2=6144
net.ipv4.neigh.default.gc_thresh3=8192
EOF
sysctl -p && systemctl restart docker
#配置加速器

sudo tee /etc/docker/daemon.json <<-'EOF'
{
"max-concurrent-downloads": 3,
"max-concurrent-uploads": 5,
"registry-mirrors": ["https://0bb06s1q.mirror.aliyuncs.com"],
"storage-driver": "overlay2",
"storage-opts": ["overlay2.override_kernel_check=true"],
"log-driver": "json-file",
"log-opts": {
  "max-size": "100m",
  "max-file": "3"
}
}
EOF
#重启docker
systemctl daemon-reload && systemctl restart docker && systemctl enable docker.service
#查看docker版本信息
sudo docker info

4. 同步/etc/hosts

# Kubernetes cluster demo1
192.168.31.130  rmaster01
192.168.31.131  rmaster02
192.168.31.132  rmaster03
192.168.31.133  node01
192.168.31.134  node02

master01节点操作

5. 配置rancher用户ssh单向无密码访问

# 所有节点执行,注意首先切换为rancher
su - rancher
ssh-keygen -t rsa

# 在rmaster01配置ssh单向无密码访问
ssh-copy-id rmaster01
ssh-copy-id rmaster02
ssh-copy-id rmaster03
ssh-copy-id node01
ssh-copy-id node02

测试

for i in `cat /etc/hosts | grep -v localhost | grep -Ev '^$|#' | awk '{print $2}'`;do ssh $i hostname;done

阿里云配置内网地址

5.1.生成cluster.yml配置文件

cat << EOF >  cluster.yml
nodes:
  - address: 172.31.53.130
    hostname_override: rmaster01
    internal_address:
    user: rancher
    role: [controlplane,etcd]
  - address: 172.31.53.131
    hostname_override: rmaster02
    internal_address:
    user: rancher
    role: [controlplane,etcd]
  - address: 172.31.53.132
    hostname_override: rmaster03
    internal_address:
    user: rancher
    role: [controlplane,etcd]
  - address: 172.31.53.133
    hostname_override: node01
    internal_address:
    user: rancher
    role: [worker]
  - address: 172.31.53.134
    hostname_override: node02
    internal_address:
    user: rancher
    role: [worker]

# 定义kubernetes版本
kubernetes_version: v1.17.5-rancher1-1

# 如果要使用私有仓库中的镜像,配置以下参数来指定默认私有仓库地址。
#private_registries:
#    - url: registry.com
#      user: Username
#      password: password
#      is_default: true

services:
  etcd:
    # 扩展参数
    extra_args:
      # 240个小时后自动清理磁盘碎片,通过auto-compaction-retention对历史数据压缩后,后端数据库可能会出现内部碎片。内部碎片是指空闲状态的,能被后端使用但是仍然消耗存储空间,碎片整理过程将此存储空间释放回文>件系统
      auto-compaction-retention: 240 #(单位小时)
      # 修改空间配额为6442450944,默认2G,最大8G
      quota-backend-bytes: '6442450944'
    # 自动备份
    snapshot: true
    creation: 5m0s
    retention: 24h
  kubelet:
    extra_args:
      # 支持静态Pod。在主机/etc/kubernetes/目录下创建manifest目录,Pod YAML文件放在/etc/kubernetes/manifest/目录下
      pod-manifest-path: "/etc/kubernetes/manifest/"
# 有几个网络插件可以选择:flannel、canal、calico,Rancher2默认canal
network:
  plugin: canal
  options:
    flannel_backend_type: "vxlan"
# 可以设置provider: none来禁用ingress controller
ingress:
  provider: nginx
  node_selector:
    app: ingress
EOF

查看RKE支持的Kubernetes版本
rke config —list-version —all

[rancher@rmaster01 ~]$ rke config -l --all
v1.17.17-rancher2-1
v1.16.15-rancher1-4
v1.18.16-rancher1-1
v1.19.8-rancher1-1
v1.20.4-rancher1-1
[rancher@rmaster01 ~]$

5.2. 部署kubernetes集群

rke up --config ./cluster.yml
[rancher@rmaster01 ~]$ rke up --config ./cluster.yml
INFO[0000] Running RKE version: v1.2.6                  
INFO[0000] Initiating Kubernetes cluster                
INFO[0000] [dialer] Setup tunnel for host [192.168.6.102] 
INFO[0000] [dialer] Setup tunnel for host [192.168.6.100] 
INFO[0000] [dialer] Setup tunnel for host [192.168.6.101] 
INFO[0000] [dialer] Setup tunnel for host [192.168.6.104] 
INFO[0000] [dialer] Setup tunnel for host [192.168.6.103] 
INFO[0000] Checking if container [cluster-state-deployer] is running on host [192.168.6.100], try #1 
INFO[0000] Pulling image [rancher/rke-tools:v0.1.72] on host [192.168.6.100], try #1 
INFO[0923] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.100] 
INFO[0929] Starting container [cluster-state-deployer] on host [192.168.6.100], try #1 
INFO[0929] [state] Successfully started [cluster-state-deployer] container on host [192.168.6.100] 
INFO[0929] Checking if container [cluster-state-deployer] is running on host [192.168.6.101], try #1 
INFO[0929] Pulling image [rancher/rke-tools:v0.1.72] on host [192.168.6.101], try #1 
INFO[1525] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.101] 
INFO[1530] Starting container [cluster-state-deployer] on host [192.168.6.101], try #1 
INFO[1530] [state] Successfully started [cluster-state-deployer] container on host [192.168.6.101] 
INFO[1530] Checking if container [cluster-state-deployer] is running on host [192.168.6.102], try #1 
INFO[1530] Pulling image [rancher/rke-tools:v0.1.72] on host [192.168.6.102], try #1 
INFO[2753] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.102] 
INFO[2758] Starting container [cluster-state-deployer] on host [192.168.6.102], try #1 
INFO[2759] [state] Successfully started [cluster-state-deployer] container on host [192.168.6.102] 
INFO[2759] Checking if container [cluster-state-deployer] is running on host [192.168.6.103], try #1 
INFO[2759] Pulling image [rancher/rke-tools:v0.1.72] on host [192.168.6.103], try #1 
INFO[2969] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.103] 
INFO[2971] Starting container [cluster-state-deployer] on host [192.168.6.103], try #1 
INFO[2972] [state] Successfully started [cluster-state-deployer] container on host [192.168.6.103] 
INFO[2972] Checking if container [cluster-state-deployer] is running on host [192.168.6.104], try #1 
INFO[2972] Pulling image [rancher/rke-tools:v0.1.72] on host [192.168.6.104], try #1 
INFO[4661] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.104] 
INFO[4664] Starting container [cluster-state-deployer] on host [192.168.6.104], try #1 
INFO[4665] [state] Successfully started [cluster-state-deployer] container on host [192.168.6.104] 
INFO[4665] [certificates] Generating CA kubernetes certificates 
INFO[4665] [certificates] Generating Kubernetes API server aggregation layer requestheader client CA certificates 
INFO[4665] [certificates] GenerateServingCertificate is disabled, checking if there are unused kubelet certificates 
INFO[4665] [certificates] Generating Kubernetes API server certificates 
INFO[4666] [certificates] Generating Service account token key 
INFO[4666] [certificates] Generating Kube Controller certificates 
INFO[4667] [certificates] Generating Kube Scheduler certificates 
INFO[4667] [certificates] Generating Kube Proxy certificates 
INFO[4668] [certificates] Generating Node certificate   
INFO[4668] [certificates] Generating admin certificates and kubeconfig 
INFO[4668] [certificates] Generating Kubernetes API server proxy client certificates 
INFO[4669] [certificates] Generating kube-etcd-192-168-6-100 certificate and key 
INFO[4669] [certificates] Generating kube-etcd-192-168-6-101 certificate and key 
INFO[4669] [certificates] Generating kube-etcd-192-168-6-102 certificate and key 
INFO[4670] Successfully Deployed state file at [./cluster.rkestate] 
INFO[4670] Building Kubernetes cluster                  
INFO[4670] [dialer] Setup tunnel for host [192.168.6.104] 
INFO[4670] [dialer] Setup tunnel for host [192.168.6.101] 
INFO[4670] [dialer] Setup tunnel for host [192.168.6.102] 
INFO[4670] [dialer] Setup tunnel for host [192.168.6.100] 
INFO[4670] [dialer] Setup tunnel for host [192.168.6.103] 
INFO[4670] [network] Deploying port listener containers 
INFO[4670] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.102] 
INFO[4670] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.100] 
INFO[4670] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.101] 
INFO[4671] Starting container [rke-etcd-port-listener] on host [192.168.6.102], try #1 
INFO[4672] Starting container [rke-etcd-port-listener] on host [192.168.6.100], try #1 
INFO[4672] [network] Successfully started [rke-etcd-port-listener] container on host [192.168.6.102] 
INFO[4672] Starting container [rke-etcd-port-listener] on host [192.168.6.101], try #1 
INFO[4673] [network] Successfully started [rke-etcd-port-listener] container on host [192.168.6.100] 
INFO[4673] [network] Successfully started [rke-etcd-port-listener] container on host [192.168.6.101] 
INFO[4673] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.100] 
INFO[4673] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.101] 
INFO[4673] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.102] 
INFO[4674] Starting container [rke-cp-port-listener] on host [192.168.6.102], try #1 
INFO[4674] Starting container [rke-cp-port-listener] on host [192.168.6.101], try #1 
INFO[4674] Starting container [rke-cp-port-listener] on host [192.168.6.100], try #1 
INFO[4675] [network] Successfully started [rke-cp-port-listener] container on host [192.168.6.102] 
INFO[4675] [network] Successfully started [rke-cp-port-listener] container on host [192.168.6.101] 
INFO[4675] [network] Successfully started [rke-cp-port-listener] container on host [192.168.6.100] 
INFO[4675] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.104] 
INFO[4675] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.103] 
INFO[4676] Starting container [rke-worker-port-listener] on host [192.168.6.104], try #1 
INFO[4676] Starting container [rke-worker-port-listener] on host [192.168.6.103], try #1 
INFO[4677] [network] Successfully started [rke-worker-port-listener] container on host [192.168.6.104] 
INFO[4677] [network] Successfully started [rke-worker-port-listener] container on host [192.168.6.103] 
INFO[4677] [network] Port listener containers deployed successfully 
INFO[4677] [network] Running etcd <-> etcd port checks  
INFO[4677] [network] Checking if host [192.168.6.100] can connect to host(s) [192.168.6.100 192.168.6.101 192.168.6.102] on port(s) [2379 2380], try #1 
INFO[4677] [network] Checking if host [192.168.6.101] can connect to host(s) [192.168.6.100 192.168.6.101 192.168.6.102] on port(s) [2379 2380], try #1 
INFO[4677] [network] Checking if host [192.168.6.102] can connect to host(s) [192.168.6.100 192.168.6.101 192.168.6.102] on port(s) [2379 2380], try #1 
INFO[4677] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.100] 
INFO[4677] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.101] 
INFO[4677] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.102] 
INFO[4679] Starting container [rke-port-checker] on host [192.168.6.102], try #1 
INFO[4679] Starting container [rke-port-checker] on host [192.168.6.100], try #1 
INFO[4679] Starting container [rke-port-checker] on host [192.168.6.101], try #1 
INFO[4679] [network] Successfully started [rke-port-checker] container on host [192.168.6.102] 
INFO[4679] [network] Successfully started [rke-port-checker] container on host [192.168.6.100] 
INFO[4679] Removing container [rke-port-checker] on host [192.168.6.102], try #1 
INFO[4679] [network] Successfully started [rke-port-checker] container on host [192.168.6.101] 
INFO[4679] Removing container [rke-port-checker] on host [192.168.6.100], try #1 
INFO[4680] Removing container [rke-port-checker] on host [192.168.6.101], try #1 
INFO[4680] [network] Running control plane -> etcd port checks 
INFO[4680] [network] Checking if host [192.168.6.100] can connect to host(s) [192.168.6.100 192.168.6.101 192.168.6.102] on port(s) [2379], try #1 
INFO[4680] [network] Checking if host [192.168.6.101] can connect to host(s) [192.168.6.100 192.168.6.101 192.168.6.102] on port(s) [2379], try #1 
INFO[4680] [network] Checking if host [192.168.6.102] can connect to host(s) [192.168.6.100 192.168.6.101 192.168.6.102] on port(s) [2379], try #1 
INFO[4680] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.100] 
INFO[4680] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.102] 
INFO[4680] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.101] 
INFO[4681] Starting container [rke-port-checker] on host [192.168.6.101], try #1 
INFO[4681] Starting container [rke-port-checker] on host [192.168.6.100], try #1 
INFO[4681] [network] Successfully started [rke-port-checker] container on host [192.168.6.101] 
INFO[4682] Removing container [rke-port-checker] on host [192.168.6.101], try #1 
INFO[4682] [network] Successfully started [rke-port-checker] container on host [192.168.6.100] 
INFO[4682] Removing container [rke-port-checker] on host [192.168.6.100], try #1 
INFO[4682] Starting container [rke-port-checker] on host [192.168.6.102], try #1 
INFO[4682] [network] Successfully started [rke-port-checker] container on host [192.168.6.102] 
INFO[4682] Removing container [rke-port-checker] on host [192.168.6.102], try #1 
INFO[4682] [network] Running control plane -> worker port checks 
INFO[4682] [network] Checking if host [192.168.6.101] can connect to host(s) [192.168.6.103 192.168.6.104] on port(s) [10250], try #1 
INFO[4682] [network] Checking if host [192.168.6.100] can connect to host(s) [192.168.6.103 192.168.6.104] on port(s) [10250], try #1 
INFO[4682] [network] Checking if host [192.168.6.102] can connect to host(s) [192.168.6.103 192.168.6.104] on port(s) [10250], try #1 
INFO[4682] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.100] 
INFO[4682] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.101] 
INFO[4682] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.102] 
INFO[4683] Starting container [rke-port-checker] on host [192.168.6.102], try #1 
INFO[4683] Starting container [rke-port-checker] on host [192.168.6.101], try #1 
INFO[4683] [network] Successfully started [rke-port-checker] container on host [192.168.6.102] 
INFO[4684] [network] Successfully started [rke-port-checker] container on host [192.168.6.101] 
INFO[4684] Removing container [rke-port-checker] on host [192.168.6.102], try #1 
INFO[4684] Removing container [rke-port-checker] on host [192.168.6.101], try #1 
INFO[4684] Starting container [rke-port-checker] on host [192.168.6.100], try #1 
INFO[4684] [network] Successfully started [rke-port-checker] container on host [192.168.6.100] 
INFO[4684] Removing container [rke-port-checker] on host [192.168.6.100], try #1 
INFO[4684] [network] Running workers -> control plane port checks 
INFO[4684] [network] Checking if host [192.168.6.103] can connect to host(s) [192.168.6.100 192.168.6.101 192.168.6.102] on port(s) [6443], try #1 
INFO[4684] [network] Checking if host [192.168.6.104] can connect to host(s) [192.168.6.100 192.168.6.101 192.168.6.102] on port(s) [6443], try #1 
INFO[4684] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.103] 
INFO[4684] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.104] 
INFO[4685] Starting container [rke-port-checker] on host [192.168.6.104], try #1 
INFO[4685] [network] Successfully started [rke-port-checker] container on host [192.168.6.104] 
INFO[4685] Removing container [rke-port-checker] on host [192.168.6.104], try #1 
INFO[4686] Starting container [rke-port-checker] on host [192.168.6.103], try #1 
INFO[4686] [network] Successfully started [rke-port-checker] container on host [192.168.6.103] 
INFO[4686] Removing container [rke-port-checker] on host [192.168.6.103], try #1 
INFO[4686] [network] Checking KubeAPI port Control Plane hosts 
INFO[4686] [network] Removing port listener containers  
INFO[4686] Removing container [rke-etcd-port-listener] on host [192.168.6.100], try #1 
INFO[4686] Removing container [rke-etcd-port-listener] on host [192.168.6.101], try #1 
INFO[4686] Removing container [rke-etcd-port-listener] on host [192.168.6.102], try #1 
INFO[4687] [remove/rke-etcd-port-listener] Successfully removed container on host [192.168.6.101] 
INFO[4687] [remove/rke-etcd-port-listener] Successfully removed container on host [192.168.6.102] 
INFO[4687] [remove/rke-etcd-port-listener] Successfully removed container on host [192.168.6.100] 
INFO[4687] Removing container [rke-cp-port-listener] on host [192.168.6.100], try #1 
INFO[4687] Removing container [rke-cp-port-listener] on host [192.168.6.102], try #1 
INFO[4687] Removing container [rke-cp-port-listener] on host [192.168.6.101], try #1 
INFO[4687] [remove/rke-cp-port-listener] Successfully removed container on host [192.168.6.102] 
INFO[4687] [remove/rke-cp-port-listener] Successfully removed container on host [192.168.6.100] 
INFO[4687] [remove/rke-cp-port-listener] Successfully removed container on host [192.168.6.101] 
INFO[4687] Removing container [rke-worker-port-listener] on host [192.168.6.104], try #1 
INFO[4687] Removing container [rke-worker-port-listener] on host [192.168.6.103], try #1 
INFO[4687] [remove/rke-worker-port-listener] Successfully removed container on host [192.168.6.104] 
INFO[4687] [remove/rke-worker-port-listener] Successfully removed container on host [192.168.6.103] 
INFO[4687] [network] Port listener containers removed successfully 
INFO[4687] [certificates] Deploying kubernetes certificates to Cluster nodes 
INFO[4687] Checking if container [cert-deployer] is running on host [192.168.6.100], try #1 
INFO[4687] Checking if container [cert-deployer] is running on host [192.168.6.101], try #1 
INFO[4687] Checking if container [cert-deployer] is running on host [192.168.6.103], try #1 
INFO[4687] Checking if container [cert-deployer] is running on host [192.168.6.102], try #1 
INFO[4687] Checking if container [cert-deployer] is running on host [192.168.6.104], try #1 
INFO[4687] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.100] 
INFO[4687] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.101] 
INFO[4687] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.102] 
INFO[4687] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.103] 
INFO[4687] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.104] 
INFO[4689] Starting container [cert-deployer] on host [192.168.6.103], try #1 
INFO[4689] Starting container [cert-deployer] on host [192.168.6.101], try #1 
INFO[4689] Starting container [cert-deployer] on host [192.168.6.102], try #1 
INFO[4689] Starting container [cert-deployer] on host [192.168.6.100], try #1 
INFO[4689] Checking if container [cert-deployer] is running on host [192.168.6.103], try #1 
INFO[4689] Checking if container [cert-deployer] is running on host [192.168.6.101], try #1 
INFO[4689] Checking if container [cert-deployer] is running on host [192.168.6.102], try #1 
INFO[4690] Checking if container [cert-deployer] is running on host [192.168.6.100], try #1 
INFO[4690] Starting container [cert-deployer] on host [192.168.6.104], try #1 
INFO[4690] Checking if container [cert-deployer] is running on host [192.168.6.104], try #1 
INFO[4694] Checking if container [cert-deployer] is running on host [192.168.6.103], try #1 
INFO[4694] Removing container [cert-deployer] on host [192.168.6.103], try #1 
INFO[4694] Checking if container [cert-deployer] is running on host [192.168.6.101], try #1 
INFO[4694] Removing container [cert-deployer] on host [192.168.6.101], try #1 
INFO[4694] Checking if container [cert-deployer] is running on host [192.168.6.102], try #1 
INFO[4694] Removing container [cert-deployer] on host [192.168.6.102], try #1 
INFO[4695] Checking if container [cert-deployer] is running on host [192.168.6.100], try #1 
INFO[4695] Removing container [cert-deployer] on host [192.168.6.100], try #1 
INFO[4695] Checking if container [cert-deployer] is running on host [192.168.6.104], try #1 
INFO[4695] Removing container [cert-deployer] on host [192.168.6.104], try #1 
INFO[4695] [reconcile] Rebuilding and updating local kube config 
INFO[4695] Successfully Deployed local admin kubeconfig at [./kube_config_cluster.yml] 
WARN[4695] [reconcile] host [192.168.6.100] is a control plane node without reachable Kubernetes API endpoint in the cluster 
INFO[4695] Successfully Deployed local admin kubeconfig at [./kube_config_cluster.yml] 
WARN[4695] [reconcile] host [192.168.6.101] is a control plane node without reachable Kubernetes API endpoint in the cluster 
INFO[4695] Successfully Deployed local admin kubeconfig at [./kube_config_cluster.yml] 
WARN[4695] [reconcile] host [192.168.6.102] is a control plane node without reachable Kubernetes API endpoint in the cluster 
WARN[4695] [reconcile] no control plane node with reachable Kubernetes API endpoint in the cluster found 
INFO[4695] [certificates] Successfully deployed kubernetes certificates to Cluster nodes 
INFO[4695] [file-deploy] Deploying file [/etc/kubernetes/audit-policy.yaml] to node [192.168.6.101] 
INFO[4695] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.101] 
INFO[4696] Starting container [file-deployer] on host [192.168.6.101], try #1 
INFO[4696] Successfully started [file-deployer] container on host [192.168.6.101] 
INFO[4696] Waiting for [file-deployer] container to exit on host [192.168.6.101] 
INFO[4696] Waiting for [file-deployer] container to exit on host [192.168.6.101] 
INFO[4696] Container [file-deployer] is still running on host [192.168.6.101]: stderr: [], stdout: [] 
INFO[4697] Waiting for [file-deployer] container to exit on host [192.168.6.101] 
INFO[4697] Removing container [file-deployer] on host [192.168.6.101], try #1 
INFO[4697] [remove/file-deployer] Successfully removed container on host [192.168.6.101] 
INFO[4697] [file-deploy] Deploying file [/etc/kubernetes/audit-policy.yaml] to node [192.168.6.102] 
INFO[4697] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.102] 
INFO[4698] Starting container [file-deployer] on host [192.168.6.102], try #1 
INFO[4698] Successfully started [file-deployer] container on host [192.168.6.102] 
INFO[4698] Waiting for [file-deployer] container to exit on host [192.168.6.102] 
INFO[4698] Waiting for [file-deployer] container to exit on host [192.168.6.102] 
INFO[4698] Container [file-deployer] is still running on host [192.168.6.102]: stderr: [], stdout: [] 
INFO[4699] Waiting for [file-deployer] container to exit on host [192.168.6.102] 
INFO[4699] Removing container [file-deployer] on host [192.168.6.102], try #1 
INFO[4699] [remove/file-deployer] Successfully removed container on host [192.168.6.102] 
INFO[4699] [file-deploy] Deploying file [/etc/kubernetes/audit-policy.yaml] to node [192.168.6.100] 
INFO[4699] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.100] 
INFO[4700] Starting container [file-deployer] on host [192.168.6.100], try #1 
INFO[4700] Successfully started [file-deployer] container on host [192.168.6.100] 
INFO[4700] Waiting for [file-deployer] container to exit on host [192.168.6.100] 
INFO[4700] Waiting for [file-deployer] container to exit on host [192.168.6.100] 
INFO[4700] Container [file-deployer] is still running on host [192.168.6.100]: stderr: [], stdout: [] 
INFO[4701] Waiting for [file-deployer] container to exit on host [192.168.6.100] 
INFO[4701] Removing container [file-deployer] on host [192.168.6.100], try #1 
INFO[4701] [remove/file-deployer] Successfully removed container on host [192.168.6.100] 
INFO[4701] [/etc/kubernetes/audit-policy.yaml] Successfully deployed audit policy file to Cluster control nodes 
INFO[4701] [reconcile] Reconciling cluster state        
INFO[4701] [reconcile] This is newly generated cluster  
INFO[4701] Pre-pulling kubernetes images                
INFO[4701] Pulling image [rancher/hyperkube:v1.19.8-rancher1] on host [192.168.6.103], try #1 
INFO[4701] Pulling image [rancher/hyperkube:v1.19.8-rancher1] on host [192.168.6.100], try #1 
INFO[4701] Pulling image [rancher/hyperkube:v1.19.8-rancher1] on host [192.168.6.101], try #1 
INFO[4701] Pulling image [rancher/hyperkube:v1.19.8-rancher1] on host [192.168.6.104], try #1 
INFO[4701] Pulling image [rancher/hyperkube:v1.19.8-rancher1] on host [192.168.6.102], try #1 
WARN[4712] Can't pull Docker image [rancher/hyperkube:v1.19.8-rancher1] on host [192.168.6.100]: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: TLS handshake timeout 
INFO[4712] Pulling image [rancher/hyperkube:v1.19.8-rancher1] on host [192.168.6.100], try #2 
WARN[4726] Can't pull Docker image [rancher/hyperkube:v1.19.8-rancher1] on host [192.168.6.100]: Error response from daemon: Get https://registry-1.docker.io/v2/rancher/hyperkube/manifests/v1.19.8-rancher1: Get https://auth.docker.io/token?scope=repository%3Arancher%2Fhyperkube%3Apull&service=registry.docker.io: net/http: TLS handshake timeout 
INFO[4726] Pulling image [rancher/hyperkube:v1.19.8-rancher1] on host [192.168.6.100], try #3 

INFO[4699] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.100] 
INFO[4700] Starting container [file-deployer] on host [192.168.6.100], try #1 
INFO[4700] Successfully started [file-deployer] container on host [192.168.6.100] 
INFO[4700] Waiting for [file-deployer] container to exit on host [192.168.6.100] 
INFO[4700] Waiting for [file-deployer] container to exit on host [192.168.6.100] 
INFO[4700] Container [file-deployer] is still running on host [192.168.6.100]: stderr: [], stdout: [] 
INFO[4701] Waiting for [file-deployer] container to exit on host [192.168.6.100] 
INFO[4701] Removing container [file-deployer] on host [192.168.6.100], try #1 
INFO[4701] [remove/file-deployer] Successfully removed container on host [192.168.6.100] 
INFO[4701] [/etc/kubernetes/audit-policy.yaml] Successfully deployed audit policy file to Cluster control nodes 
INFO[4701] [reconcile] Reconciling cluster state        
INFO[4701] [reconcile] This is newly generated cluster  
INFO[4701] Pre-pulling kubernetes images                
INFO[4701] Pulling image [rancher/hyperkube:v1.19.8-rancher1] on host [192.168.6.103], try #1 
INFO[4701] Pulling image [rancher/hyperkube:v1.19.8-rancher1] on host [192.168.6.100], try #1 
INFO[4701] Pulling image [rancher/hyperkube:v1.19.8-rancher1] on host [192.168.6.101], try #1 
INFO[4701] Pulling image [rancher/hyperkube:v1.19.8-rancher1] on host [192.168.6.104], try #1 
INFO[4701] Pulling image [rancher/hyperkube:v1.19.8-rancher1] on host [192.168.6.102], try #1 
WARN[4712] Can't pull Docker image [rancher/hyperkube:v1.19.8-rancher1] on host [192.168.6.100]: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: TLS handshake timeout 
INFO[4712] Pulling image [rancher/hyperkube:v1.19.8-rancher1] on host [192.168.6.100], try #2 
WARN[4726] Can't pull Docker image [rancher/hyperkube:v1.19.8-rancher1] on host [192.168.6.100]: Error response from daemon: Get https://registry-1.docker.io/v2/rancher/hyperkube/manifests/v1.19.8-rancher1: Get https://auth.docker.io/token?scope=repository%3Arancher%2Fhyperkube%3Apull&service=registry.docker.io: net/http: TLS handshake timeout 
INFO[4726] Pulling image [rancher/hyperkube:v1.19.8-rancher1] on host [192.168.6.100], try #3 
INFO[8550] Image [rancher/hyperkube:v1.19.8-rancher1] exists on host [192.168.6.100] 
INFO[8721] Image [rancher/hyperkube:v1.19.8-rancher1] exists on host [192.168.6.103] 
INFO[8829] Image [rancher/hyperkube:v1.19.8-rancher1] exists on host [192.168.6.101] 
INFO[9357] Image [rancher/hyperkube:v1.19.8-rancher1] exists on host [192.168.6.104] 
INFO[9774] Image [rancher/hyperkube:v1.19.8-rancher1] exists on host [192.168.6.102] 
INFO[9774] Kubernetes images pulled successfully        
INFO[9774] [etcd] Building up etcd plane..              
INFO[9777] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.100] 
INFO[9779] Starting container [etcd-fix-perm] on host [192.168.6.100], try #1 
INFO[9780] Successfully started [etcd-fix-perm] container on host [192.168.6.100] 
INFO[9780] Waiting for [etcd-fix-perm] container to exit on host [192.168.6.100] 
INFO[9780] Waiting for [etcd-fix-perm] container to exit on host [192.168.6.100] 
INFO[9780] Container [etcd-fix-perm] is still running on host [192.168.6.100]: stderr: [], stdout: [] 
INFO[9781] Waiting for [etcd-fix-perm] container to exit on host [192.168.6.100] 
INFO[9781] Removing container [etcd-fix-perm] on host [192.168.6.100], try #1 
INFO[9781] [remove/etcd-fix-perm] Successfully removed container on host [192.168.6.100] 
INFO[9781] Image [rancher/coreos-etcd:v3.4.13-rancher1] exists on host [192.168.6.100] 
INFO[9781] Starting container [etcd] on host [192.168.6.100], try #1 
INFO[9781] [etcd] Successfully started [etcd] container on host [192.168.6.100] 
INFO[9781] [etcd] Running rolling snapshot container [etcd-snapshot-once] on host [192.168.6.100] 
INFO[9782] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.100] 
INFO[9782] Starting container [etcd-rolling-snapshots] on host [192.168.6.100], try #1 
INFO[9782] [etcd] Successfully started [etcd-rolling-snapshots] container on host [192.168.6.100] 
INFO[9787] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.100] 
INFO[9795] Starting container [rke-bundle-cert] on host [192.168.6.100], try #1 
INFO[9796] [certificates] Successfully started [rke-bundle-cert] container on host [192.168.6.100] 
INFO[9796] Waiting for [rke-bundle-cert] container to exit on host [192.168.6.100] 
INFO[9796] Container [rke-bundle-cert] is still running on host [192.168.6.100]: stderr: [], stdout: [] 
INFO[9797] Waiting for [rke-bundle-cert] container to exit on host [192.168.6.100] 
INFO[9797] [certificates] successfully saved certificate bundle [/opt/rke/etcd-snapshots//pki.bundle.tar.gz] on host [192.168.6.100] 
INFO[9797] Removing container [rke-bundle-cert] on host [192.168.6.100], try #1 
INFO[9797] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.100] 
INFO[9797] Starting container [rke-log-linker] on host [192.168.6.100], try #1 
INFO[9798] [etcd] Successfully started [rke-log-linker] container on host [192.168.6.100] 
INFO[9798] Removing container [rke-log-linker] on host [192.168.6.100], try #1 
INFO[9798] [remove/rke-log-linker] Successfully removed container on host [192.168.6.100] 
INFO[9798] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.100] 
INFO[9799] Starting container [rke-log-linker] on host [192.168.6.100], try #1 
INFO[9799] [etcd] Successfully started [rke-log-linker] container on host [192.168.6.100] 
INFO[9799] Removing container [rke-log-linker] on host [192.168.6.100], try #1 
INFO[9800] [remove/rke-log-linker] Successfully removed container on host [192.168.6.100] 
INFO[9800] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.101] 
INFO[9803] Starting container [etcd-fix-perm] on host [192.168.6.101], try #1 
INFO[9804] Successfully started [etcd-fix-perm] container on host [192.168.6.101] 
INFO[9804] Waiting for [etcd-fix-perm] container to exit on host [192.168.6.101] 
INFO[9804] Waiting for [etcd-fix-perm] container to exit on host [192.168.6.101] 
INFO[9804] Container [etcd-fix-perm] is still running on host [192.168.6.101]: stderr: [], stdout: [] 
INFO[9805] Waiting for [etcd-fix-perm] container to exit on host [192.168.6.101] 
INFO[9805] Removing container [etcd-fix-perm] on host [192.168.6.101], try #1 
INFO[9805] [remove/etcd-fix-perm] Successfully removed container on host [192.168.6.101] 
INFO[9805] Pulling image [rancher/coreos-etcd:v3.4.13-rancher1] on host [192.168.6.101], try #1 
INFO[9816] Image [rancher/coreos-etcd:v3.4.13-rancher1] exists on host [192.168.6.101] 
INFO[9819] Starting container [etcd] on host [192.168.6.101], try #1 
INFO[9819] [etcd] Successfully started [etcd] container on host [192.168.6.101] 
INFO[9819] [etcd] Running rolling snapshot container [etcd-snapshot-once] on host [192.168.6.101] 
INFO[9819] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.101] 
INFO[9820] Starting container [etcd-rolling-snapshots] on host [192.168.6.101], try #1 
INFO[9820] [etcd] Successfully started [etcd-rolling-snapshots] container on host [192.168.6.101] 
INFO[9825] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.101] 
INFO[9826] Starting container [rke-bundle-cert] on host [192.168.6.101], try #1 
INFO[9827] [certificates] Successfully started [rke-bundle-cert] container on host [192.168.6.101] 
INFO[9827] Waiting for [rke-bundle-cert] container to exit on host [192.168.6.101] 
INFO[9827] Container [rke-bundle-cert] is still running on host [192.168.6.101]: stderr: [], stdout: [] 
INFO[9828] Waiting for [rke-bundle-cert] container to exit on host [192.168.6.101] 
INFO[9828] [certificates] successfully saved certificate bundle [/opt/rke/etcd-snapshots//pki.bundle.tar.gz] on host [192.168.6.101] 
INFO[9828] Removing container [rke-bundle-cert] on host [192.168.6.101], try #1 
INFO[9828] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.101] 
INFO[9829] Starting container [rke-log-linker] on host [192.168.6.101], try #1 
INFO[9829] [etcd] Successfully started [rke-log-linker] container on host [192.168.6.101] 
INFO[9829] Removing container [rke-log-linker] on host [192.168.6.101], try #1 
INFO[9829] [remove/rke-log-linker] Successfully removed container on host [192.168.6.101] 
INFO[9830] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.101] 
INFO[9830] Starting container [rke-log-linker] on host [192.168.6.101], try #1 
INFO[9831] [etcd] Successfully started [rke-log-linker] container on host [192.168.6.101] 
INFO[9831] Removing container [rke-log-linker] on host [192.168.6.101], try #1 
INFO[9831] [remove/rke-log-linker] Successfully removed container on host [192.168.6.101] 
INFO[9831] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.102] 
INFO[9832] Starting container [etcd-fix-perm] on host [192.168.6.102], try #1 
INFO[9833] Successfully started [etcd-fix-perm] container on host [192.168.6.102] 
INFO[9833] Waiting for [etcd-fix-perm] container to exit on host [192.168.6.102] 
INFO[9833] Waiting for [etcd-fix-perm] container to exit on host [192.168.6.102] 
INFO[9833] Container [etcd-fix-perm] is still running on host [192.168.6.102]: stderr: [], stdout: [] 
INFO[9834] Waiting for [etcd-fix-perm] container to exit on host [192.168.6.102] 
INFO[9834] Removing container [etcd-fix-perm] on host [192.168.6.102], try #1 
INFO[9834] [remove/etcd-fix-perm] Successfully removed container on host [192.168.6.102] 
INFO[9834] Pulling image [rancher/coreos-etcd:v3.4.13-rancher1] on host [192.168.6.102], try #1 
INFO[9844] Image [rancher/coreos-etcd:v3.4.13-rancher1] exists on host [192.168.6.102] 
INFO[9848] Starting container [etcd] on host [192.168.6.102], try #1 
INFO[9848] [etcd] Successfully started [etcd] container on host [192.168.6.102] 
INFO[9848] [etcd] Running rolling snapshot container [etcd-snapshot-once] on host [192.168.6.102] 
INFO[9848] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.102] 
INFO[9849] Starting container [etcd-rolling-snapshots] on host [192.168.6.102], try #1 
INFO[9849] [etcd] Successfully started [etcd-rolling-snapshots] container on host [192.168.6.102] 
INFO[9854] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.102] 
INFO[9855] Starting container [rke-bundle-cert] on host [192.168.6.102], try #1 
INFO[9856] [certificates] Successfully started [rke-bundle-cert] container on host [192.168.6.102] 
INFO[9856] Waiting for [rke-bundle-cert] container to exit on host [192.168.6.102] 
INFO[9856] Container [rke-bundle-cert] is still running on host [192.168.6.102]: stderr: [], stdout: [] 
INFO[9857] Waiting for [rke-bundle-cert] container to exit on host [192.168.6.102] 
INFO[9857] [certificates] successfully saved certificate bundle [/opt/rke/etcd-snapshots//pki.bundle.tar.gz] on host [192.168.6.102] 
INFO[9857] Removing container [rke-bundle-cert] on host [192.168.6.102], try #1 
INFO[9857] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.102] 
INFO[9858] Starting container [rke-log-linker] on host [192.168.6.102], try #1 
INFO[9858] [etcd] Successfully started [rke-log-linker] container on host [192.168.6.102] 
INFO[9858] Removing container [rke-log-linker] on host [192.168.6.102], try #1 
INFO[9858] [remove/rke-log-linker] Successfully removed container on host [192.168.6.102] 
INFO[9858] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.102] 
INFO[9859] Starting container [rke-log-linker] on host [192.168.6.102], try #1 
INFO[9860] [etcd] Successfully started [rke-log-linker] container on host [192.168.6.102] 
INFO[9860] Removing container [rke-log-linker] on host [192.168.6.102], try #1 
INFO[9860] [remove/rke-log-linker] Successfully removed container on host [192.168.6.102] 
INFO[9860] [etcd] Successfully started etcd plane.. Checking etcd cluster health 
INFO[9860] [etcd] etcd host [192.168.6.100] reported healthy=true 
INFO[9860] [controlplane] Building up Controller Plane.. 
INFO[9860] Checking if container [service-sidekick] is running on host [192.168.6.101], try #1 
INFO[9860] Checking if container [service-sidekick] is running on host [192.168.6.102], try #1 
INFO[9860] Checking if container [service-sidekick] is running on host [192.168.6.100], try #1 
INFO[9860] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.101] 
INFO[9860] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.102] 
INFO[9860] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.100] 
INFO[9861] Image [rancher/hyperkube:v1.19.8-rancher1] exists on host [192.168.6.102] 
INFO[9861] Starting container [kube-apiserver] on host [192.168.6.102], try #1 
INFO[9862] [controlplane] Successfully started [kube-apiserver] container on host [192.168.6.102] 
INFO[9862] [healthcheck] Start Healthcheck on service [kube-apiserver] on host [192.168.6.102] 
INFO[9862] Image [rancher/hyperkube:v1.19.8-rancher1] exists on host [192.168.6.100] 
INFO[9862] Image [rancher/hyperkube:v1.19.8-rancher1] exists on host [192.168.6.101] 
INFO[9862] Starting container [kube-apiserver] on host [192.168.6.100], try #1 
INFO[9862] Starting container [kube-apiserver] on host [192.168.6.101], try #1 
INFO[9863] [controlplane] Successfully started [kube-apiserver] container on host [192.168.6.101] 
INFO[9863] [healthcheck] Start Healthcheck on service [kube-apiserver] on host [192.168.6.101] 
INFO[9863] [controlplane] Successfully started [kube-apiserver] container on host [192.168.6.100] 
INFO[9863] [healthcheck] Start Healthcheck on service [kube-apiserver] on host [192.168.6.100] 
INFO[9877] [healthcheck] service [kube-apiserver] on host [192.168.6.101] is healthy 
INFO[9877] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.101] 
INFO[9877] [healthcheck] service [kube-apiserver] on host [192.168.6.102] is healthy 
INFO[9877] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.102] 
INFO[9878] [healthcheck] service [kube-apiserver] on host [192.168.6.100] is healthy 
INFO[9878] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.100] 
INFO[9878] Starting container [rke-log-linker] on host [192.168.6.101], try #1 
INFO[9879] [controlplane] Successfully started [rke-log-linker] container on host [192.168.6.101] 
INFO[9879] Removing container [rke-log-linker] on host [192.168.6.101], try #1 
INFO[9879] Starting container [rke-log-linker] on host [192.168.6.100], try #1 
INFO[9879] Starting container [rke-log-linker] on host [192.168.6.102], try #1 
INFO[9879] [remove/rke-log-linker] Successfully removed container on host [192.168.6.101] 
INFO[9879] Image [rancher/hyperkube:v1.19.8-rancher1] exists on host [192.168.6.101] 
INFO[9879] Starting container [kube-controller-manager] on host [192.168.6.101], try #1 
INFO[9879] [controlplane] Successfully started [kube-controller-manager] container on host [192.168.6.101] 
INFO[9879] [healthcheck] Start Healthcheck on service [kube-controller-manager] on host [192.168.6.101] 
INFO[9879] [controlplane] Successfully started [rke-log-linker] container on host [192.168.6.100] 
INFO[9879] Removing container [rke-log-linker] on host [192.168.6.100], try #1 
INFO[9880] [controlplane] Successfully started [rke-log-linker] container on host [192.168.6.102] 
INFO[9880] Removing container [rke-log-linker] on host [192.168.6.102], try #1 
INFO[9880] [remove/rke-log-linker] Successfully removed container on host [192.168.6.100] 
INFO[9880] Image [rancher/hyperkube:v1.19.8-rancher1] exists on host [192.168.6.100] 
INFO[9880] Starting container [kube-controller-manager] on host [192.168.6.100], try #1 
INFO[9880] [remove/rke-log-linker] Successfully removed container on host [192.168.6.102] 
INFO[9880] Image [rancher/hyperkube:v1.19.8-rancher1] exists on host [192.168.6.102] 
INFO[9880] Starting container [kube-controller-manager] on host [192.168.6.102], try #1 
INFO[9880] [controlplane] Successfully started [kube-controller-manager] container on host [192.168.6.100] 
INFO[9880] [healthcheck] Start Healthcheck on service [kube-controller-manager] on host [192.168.6.100] 
INFO[9880] [controlplane] Successfully started [kube-controller-manager] container on host [192.168.6.102] 
INFO[9880] [healthcheck] Start Healthcheck on service [kube-controller-manager] on host [192.168.6.102] 
INFO[9885] [healthcheck] service [kube-controller-manager] on host [192.168.6.101] is healthy 
INFO[9885] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.101] 
INFO[9885] Starting container [rke-log-linker] on host [192.168.6.101], try #1 
INFO[9885] [healthcheck] service [kube-controller-manager] on host [192.168.6.100] is healthy 
INFO[9885] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.100] 
INFO[9886] [healthcheck] service [kube-controller-manager] on host [192.168.6.102] is healthy 
INFO[9886] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.102] 
INFO[9886] [controlplane] Successfully started [rke-log-linker] container on host [192.168.6.101] 
INFO[9886] Removing container [rke-log-linker] on host [192.168.6.101], try #1 
INFO[9886] Starting container [rke-log-linker] on host [192.168.6.100], try #1 
INFO[9887] [remove/rke-log-linker] Successfully removed container on host [192.168.6.101] 
INFO[9887] Image [rancher/hyperkube:v1.19.8-rancher1] exists on host [192.168.6.101] 
INFO[9887] Starting container [rke-log-linker] on host [192.168.6.102], try #1 
INFO[9887] Starting container [kube-scheduler] on host [192.168.6.101], try #1 
INFO[9887] [controlplane] Successfully started [rke-log-linker] container on host [192.168.6.100] 
INFO[9887] Removing container [rke-log-linker] on host [192.168.6.100], try #1 
INFO[9887] [controlplane] Successfully started [kube-scheduler] container on host [192.168.6.101] 
INFO[9887] [healthcheck] Start Healthcheck on service [kube-scheduler] on host [192.168.6.101] 
INFO[9888] [controlplane] Successfully started [rke-log-linker] container on host [192.168.6.102] 
INFO[9888] Removing container [rke-log-linker] on host [192.168.6.102], try #1 
INFO[9888] [remove/rke-log-linker] Successfully removed container on host [192.168.6.100] 
INFO[9888] Image [rancher/hyperkube:v1.19.8-rancher1] exists on host [192.168.6.100] 
INFO[9888] Starting container [kube-scheduler] on host [192.168.6.100], try #1 
INFO[9888] [remove/rke-log-linker] Successfully removed container on host [192.168.6.102] 
INFO[9888] Image [rancher/hyperkube:v1.19.8-rancher1] exists on host [192.168.6.102] 
INFO[9888] [controlplane] Successfully started [kube-scheduler] container on host [192.168.6.100] 
INFO[9888] [healthcheck] Start Healthcheck on service [kube-scheduler] on host [192.168.6.100] 
INFO[9888] Starting container [kube-scheduler] on host [192.168.6.102], try #1 
INFO[9888] [controlplane] Successfully started [kube-scheduler] container on host [192.168.6.102] 
INFO[9888] [healthcheck] Start Healthcheck on service [kube-scheduler] on host [192.168.6.102] 
INFO[9893] [healthcheck] service [kube-scheduler] on host [192.168.6.101] is healthy 
INFO[9893] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.101] 
INFO[9893] [healthcheck] service [kube-scheduler] on host [192.168.6.100] is healthy 
INFO[9893] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.100] 
INFO[9893] [healthcheck] service [kube-scheduler] on host [192.168.6.102] is healthy 
INFO[9893] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.102] 
INFO[9894] Starting container [rke-log-linker] on host [192.168.6.100], try #1 
INFO[9894] Starting container [rke-log-linker] on host [192.168.6.102], try #1 
INFO[9894] Starting container [rke-log-linker] on host [192.168.6.101], try #1 
INFO[9895] [controlplane] Successfully started [rke-log-linker] container on host [192.168.6.100] 
INFO[9895] Removing container [rke-log-linker] on host [192.168.6.100], try #1 
INFO[9895] [controlplane] Successfully started [rke-log-linker] container on host [192.168.6.102] 
INFO[9895] Removing container [rke-log-linker] on host [192.168.6.102], try #1 
INFO[9895] [remove/rke-log-linker] Successfully removed container on host [192.168.6.100] 
INFO[9895] [controlplane] Successfully started [rke-log-linker] container on host [192.168.6.101] 
INFO[9895] Removing container [rke-log-linker] on host [192.168.6.101], try #1 
INFO[9895] [remove/rke-log-linker] Successfully removed container on host [192.168.6.102] 
INFO[9895] [remove/rke-log-linker] Successfully removed container on host [192.168.6.101] 
INFO[9895] [controlplane] Successfully started Controller Plane.. 
INFO[9895] [authz] Creating rke-job-deployer ServiceAccount 
INFO[9895] [authz] rke-job-deployer ServiceAccount created successfully 
INFO[9895] [authz] Creating system:node ClusterRoleBinding 
INFO[9895] [authz] system:node ClusterRoleBinding created successfully 
INFO[9895] [authz] Creating kube-apiserver proxy ClusterRole and ClusterRoleBinding 
INFO[9895] [authz] kube-apiserver proxy ClusterRole and ClusterRoleBinding created successfully 
INFO[9895] Successfully Deployed state file at [./cluster.rkestate] 
INFO[9895] [state] Saving full cluster state to Kubernetes 
INFO[9895] [state] Successfully Saved full cluster state to Kubernetes ConfigMap: full-cluster-state 
INFO[9895] [worker] Building up Worker Plane..          
INFO[9895] Checking if container [service-sidekick] is running on host [192.168.6.100], try #1 
INFO[9895] Checking if container [service-sidekick] is running on host [192.168.6.101], try #1 
INFO[9895] Checking if container [service-sidekick] is running on host [192.168.6.102], try #1 
INFO[9895] [sidekick] Sidekick container already created on host [192.168.6.101] 
INFO[9895] [sidekick] Sidekick container already created on host [192.168.6.102] 
INFO[9895] [sidekick] Sidekick container already created on host [192.168.6.100] 
INFO[9895] Image [rancher/hyperkube:v1.19.8-rancher1] exists on host [192.168.6.101] 
INFO[9895] Image [rancher/hyperkube:v1.19.8-rancher1] exists on host [192.168.6.102] 
INFO[9896] Image [rancher/hyperkube:v1.19.8-rancher1] exists on host [192.168.6.100] 
INFO[9896] Starting container [kubelet] on host [192.168.6.101], try #1 
INFO[9896] Starting container [kubelet] on host [192.168.6.100], try #1 
INFO[9896] Starting container [kubelet] on host [192.168.6.102], try #1 
INFO[9896] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.104] 
INFO[9896] [worker] Successfully started [kubelet] container on host [192.168.6.100] 
INFO[9896] [healthcheck] Start Healthcheck on service [kubelet] on host [192.168.6.100] 
INFO[9896] [worker] Successfully started [kubelet] container on host [192.168.6.102] 
INFO[9896] [healthcheck] Start Healthcheck on service [kubelet] on host [192.168.6.102] 
INFO[9896] [worker] Successfully started [kubelet] container on host [192.168.6.101] 
INFO[9896] [healthcheck] Start Healthcheck on service [kubelet] on host [192.168.6.101] 
INFO[9897] Starting container [nginx-proxy] on host [192.168.6.104], try #1 
INFO[9897] [worker] Successfully started [nginx-proxy] container on host [192.168.6.104] 
INFO[9897] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.104] 
INFO[9899] Starting container [rke-log-linker] on host [192.168.6.104], try #1 
INFO[9899] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.103] 
INFO[9899] [worker] Successfully started [rke-log-linker] container on host [192.168.6.104] 
INFO[9899] Removing container [rke-log-linker] on host [192.168.6.104], try #1 
INFO[9900] [remove/rke-log-linker] Successfully removed container on host [192.168.6.104] 
INFO[9900] Checking if container [service-sidekick] is running on host [192.168.6.104], try #1 
INFO[9900] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.104] 
INFO[9900] Starting container [nginx-proxy] on host [192.168.6.103], try #1 
INFO[9901] [worker] Successfully started [nginx-proxy] container on host [192.168.6.103] 
INFO[9901] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.103] 
INFO[9902] Image [rancher/hyperkube:v1.19.8-rancher1] exists on host [192.168.6.104] 
INFO[9902] Starting container [kubelet] on host [192.168.6.104], try #1 
INFO[9902] [worker] Successfully started [kubelet] container on host [192.168.6.104] 
INFO[9902] [healthcheck] Start Healthcheck on service [kubelet] on host [192.168.6.104] 
INFO[9903] Starting container [rke-log-linker] on host [192.168.6.103], try #1 
INFO[9904] [worker] Successfully started [rke-log-linker] container on host [192.168.6.103] 
INFO[9904] Removing container [rke-log-linker] on host [192.168.6.103], try #1 
INFO[9904] [remove/rke-log-linker] Successfully removed container on host [192.168.6.103] 
INFO[9904] Checking if container [service-sidekick] is running on host [192.168.6.103], try #1 
INFO[9904] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.103] 
INFO[9905] Image [rancher/hyperkube:v1.19.8-rancher1] exists on host [192.168.6.103] 
INFO[9905] Starting container [kubelet] on host [192.168.6.103], try #1 
INFO[9905] [worker] Successfully started [kubelet] container on host [192.168.6.103] 
INFO[9905] [healthcheck] Start Healthcheck on service [kubelet] on host [192.168.6.103] 
INFO[9907] [healthcheck] service [kubelet] on host [192.168.6.102] is healthy 
INFO[9907] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.102] 
INFO[9907] Starting container [rke-log-linker] on host [192.168.6.102], try #1 
INFO[9908] [worker] Successfully started [rke-log-linker] container on host [192.168.6.102] 
INFO[9908] Removing container [rke-log-linker] on host [192.168.6.102], try #1 
INFO[9909] [remove/rke-log-linker] Successfully removed container on host [192.168.6.102] 
INFO[9909] Image [rancher/hyperkube:v1.19.8-rancher1] exists on host [192.168.6.102] 
INFO[9909] Starting container [kube-proxy] on host [192.168.6.102], try #1 
INFO[9909] [worker] Successfully started [kube-proxy] container on host [192.168.6.102] 
INFO[9909] [healthcheck] Start Healthcheck on service [kube-proxy] on host [192.168.6.102] 
INFO[9911] [healthcheck] service [kubelet] on host [192.168.6.100] is healthy 
INFO[9911] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.100] 
INFO[9912] [healthcheck] service [kubelet] on host [192.168.6.101] is healthy 
INFO[9912] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.101] 
INFO[9912] Starting container [rke-log-linker] on host [192.168.6.100], try #1 
INFO[9913] Starting container [rke-log-linker] on host [192.168.6.101], try #1 
INFO[9913] [worker] Successfully started [rke-log-linker] container on host [192.168.6.100] 
INFO[9913] Removing container [rke-log-linker] on host [192.168.6.100], try #1 
INFO[9914] [remove/rke-log-linker] Successfully removed container on host [192.168.6.100] 
INFO[9914] Image [rancher/hyperkube:v1.19.8-rancher1] exists on host [192.168.6.100] 
INFO[9914] Starting container [kube-proxy] on host [192.168.6.100], try #1 
INFO[9914] [worker] Successfully started [rke-log-linker] container on host [192.168.6.101] 
INFO[9914] Removing container [rke-log-linker] on host [192.168.6.101], try #1 
INFO[9914] [worker] Successfully started [kube-proxy] container on host [192.168.6.100] 
INFO[9914] [healthcheck] Start Healthcheck on service [kube-proxy] on host [192.168.6.100] 
INFO[9914] [remove/rke-log-linker] Successfully removed container on host [192.168.6.101] 
INFO[9914] Image [rancher/hyperkube:v1.19.8-rancher1] exists on host [192.168.6.101] 
INFO[9914] Starting container [kube-proxy] on host [192.168.6.101], try #1 
INFO[9914] [healthcheck] service [kube-proxy] on host [192.168.6.102] is healthy 
INFO[9914] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.102] 
INFO[9914] [worker] Successfully started [kube-proxy] container on host [192.168.6.101] 
INFO[9914] [healthcheck] Start Healthcheck on service [kube-proxy] on host [192.168.6.101] 
INFO[9915] Starting container [rke-log-linker] on host [192.168.6.102], try #1 
INFO[9916] [worker] Successfully started [rke-log-linker] container on host [192.168.6.102] 
INFO[9916] Removing container [rke-log-linker] on host [192.168.6.102], try #1 
INFO[9916] [remove/rke-log-linker] Successfully removed container on host [192.168.6.102] 
INFO[9918] [healthcheck] service [kubelet] on host [192.168.6.104] is healthy 
INFO[9918] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.104] 
INFO[9919] Starting container [rke-log-linker] on host [192.168.6.104], try #1 
INFO[9919] [healthcheck] service [kube-proxy] on host [192.168.6.100] is healthy 
INFO[9919] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.100] 
INFO[9919] [worker] Successfully started [rke-log-linker] container on host [192.168.6.104] 
INFO[9919] Removing container [rke-log-linker] on host [192.168.6.104], try #1 
INFO[9920] [healthcheck] service [kube-proxy] on host [192.168.6.101] is healthy 
INFO[9920] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.101] 
INFO[9920] [remove/rke-log-linker] Successfully removed container on host [192.168.6.104] 
INFO[9920] Image [rancher/hyperkube:v1.19.8-rancher1] exists on host [192.168.6.104] 
INFO[9920] Starting container [kube-proxy] on host [192.168.6.104], try #1 
INFO[9920] Starting container [rke-log-linker] on host [192.168.6.101], try #1 
INFO[9920] [worker] Successfully started [kube-proxy] container on host [192.168.6.104] 
INFO[9920] [healthcheck] Start Healthcheck on service [kube-proxy] on host [192.168.6.104] 
INFO[9921] Starting container [rke-log-linker] on host [192.168.6.100], try #1 
INFO[9921] [healthcheck] service [kubelet] on host [192.168.6.103] is healthy 
INFO[9921] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.103] 
INFO[9921] [worker] Successfully started [rke-log-linker] container on host [192.168.6.101] 
INFO[9921] Removing container [rke-log-linker] on host [192.168.6.101], try #1 
INFO[9921] [remove/rke-log-linker] Successfully removed container on host [192.168.6.101] 
INFO[9921] [healthcheck] service [kube-proxy] on host [192.168.6.104] is healthy 
INFO[9921] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.104] 
INFO[9922] [worker] Successfully started [rke-log-linker] container on host [192.168.6.100] 
INFO[9922] Removing container [rke-log-linker] on host [192.168.6.100], try #1 
INFO[9922] [remove/rke-log-linker] Successfully removed container on host [192.168.6.100] 
INFO[9923] Starting container [rke-log-linker] on host [192.168.6.103], try #1 
INFO[9923] Starting container [rke-log-linker] on host [192.168.6.104], try #1 
INFO[9924] [worker] Successfully started [rke-log-linker] container on host [192.168.6.103] 
INFO[9924] Removing container [rke-log-linker] on host [192.168.6.103], try #1 
INFO[9924] [remove/rke-log-linker] Successfully removed container on host [192.168.6.103] 
INFO[9924] Image [rancher/hyperkube:v1.19.8-rancher1] exists on host [192.168.6.103] 
INFO[9924] Starting container [kube-proxy] on host [192.168.6.103], try #1 
INFO[9924] [worker] Successfully started [rke-log-linker] container on host [192.168.6.104] 
INFO[9924] Removing container [rke-log-linker] on host [192.168.6.104], try #1 
INFO[9924] [worker] Successfully started [kube-proxy] container on host [192.168.6.103] 
INFO[9924] [healthcheck] Start Healthcheck on service [kube-proxy] on host [192.168.6.103] 
INFO[9924] [remove/rke-log-linker] Successfully removed container on host [192.168.6.104] 
INFO[9930] [healthcheck] service [kube-proxy] on host [192.168.6.103] is healthy 
INFO[9930] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.103] 
INFO[9930] Starting container [rke-log-linker] on host [192.168.6.103], try #1 
INFO[9931] [worker] Successfully started [rke-log-linker] container on host [192.168.6.103] 
INFO[9931] Removing container [rke-log-linker] on host [192.168.6.103], try #1 
INFO[9931] [remove/rke-log-linker] Successfully removed container on host [192.168.6.103] 
INFO[9931] [worker] Successfully started Worker Plane.. 
INFO[9931] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.101] 
INFO[9931] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.100] 
INFO[9931] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.102] 
INFO[9931] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.104] 
INFO[9931] Image [rancher/rke-tools:v0.1.72] exists on host [192.168.6.103] 
INFO[9933] Starting container [rke-log-cleaner] on host [192.168.6.100], try #1 
INFO[9933] Starting container [rke-log-cleaner] on host [192.168.6.102], try #1 
INFO[9933] Starting container [rke-log-cleaner] on host [192.168.6.104], try #1 
INFO[9933] [cleanup] Successfully started [rke-log-cleaner] container on host [192.168.6.100] 
INFO[9933] Removing container [rke-log-cleaner] on host [192.168.6.100], try #1 
INFO[9934] [cleanup] Successfully started [rke-log-cleaner] container on host [192.168.6.102] 
INFO[9934] Removing container [rke-log-cleaner] on host [192.168.6.102], try #1 
INFO[9934] [cleanup] Successfully started [rke-log-cleaner] container on host [192.168.6.104] 
INFO[9934] Removing container [rke-log-cleaner] on host [192.168.6.104], try #1 
INFO[9934] [remove/rke-log-cleaner] Successfully removed container on host [192.168.6.100] 
INFO[9934] [remove/rke-log-cleaner] Successfully removed container on host [192.168.6.102] 
INFO[9934] Starting container [rke-log-cleaner] on host [192.168.6.101], try #1 
INFO[9934] [remove/rke-log-cleaner] Successfully removed container on host [192.168.6.104] 
INFO[9935] [cleanup] Successfully started [rke-log-cleaner] container on host [192.168.6.101] 
INFO[9935] Removing container [rke-log-cleaner] on host [192.168.6.101], try #1 
INFO[9935] Starting container [rke-log-cleaner] on host [192.168.6.103], try #1 
INFO[9935] [remove/rke-log-cleaner] Successfully removed container on host [192.168.6.101] 
INFO[9935] [cleanup] Successfully started [rke-log-cleaner] container on host [192.168.6.103] 
INFO[9935] Removing container [rke-log-cleaner] on host [192.168.6.103], try #1 
INFO[9936] [remove/rke-log-cleaner] Successfully removed container on host [192.168.6.103] 
INFO[9936] [sync] Syncing nodes Labels and Taints       
INFO[9936] [sync] Successfully synced nodes Labels and Taints 
INFO[9936] [network] Setting up network plugin: canal   
INFO[9936] [addons] Saving ConfigMap for addon rke-network-plugin to Kubernetes 
INFO[9936] [addons] Successfully saved ConfigMap for addon rke-network-plugin to Kubernetes 
INFO[9936] [addons] Executing deploy job rke-network-plugin 
INFO[9951] [addons] Setting up coredns                  
INFO[9951] [addons] Saving ConfigMap for addon rke-coredns-addon to Kubernetes 
INFO[9951] [addons] Successfully saved ConfigMap for addon rke-coredns-addon to Kubernetes 
INFO[9951] [addons] Executing deploy job rke-coredns-addon 
INFO[9957] [addons] CoreDNS deployed successfully       
INFO[9957] [dns] DNS provider coredns deployed successfully 
INFO[9957] [addons] Setting up Metrics Server           
INFO[9957] [addons] Saving ConfigMap for addon rke-metrics-addon to Kubernetes 
INFO[9957] [addons] Successfully saved ConfigMap for addon rke-metrics-addon to Kubernetes 
INFO[9957] [addons] Executing deploy job rke-metrics-addon 
INFO[9962] [addons] Metrics Server deployed successfully 
INFO[9962] [ingress] Setting up nginx ingress controller 
INFO[9962] [addons] Saving ConfigMap for addon rke-ingress-controller to Kubernetes 
INFO[9962] [addons] Successfully saved ConfigMap for addon rke-ingress-controller to Kubernetes 
INFO[9962] [addons] Executing deploy job rke-ingress-controller 
INFO[9972] [ingress] ingress controller nginx deployed successfully 
INFO[9972] [addons] Setting up user addons              
INFO[9972] [addons] no user addons defined              
INFO[9972] Finished building Kubernetes cluster successfully

5.3. kube配置文件

下载kubectl工具
访问: https://docs.rancher.cn/rancher2x/install-prepare/download/kubernetes.html 查询kubectl下载的版本
#wget http://rancher-mirror.cnrancher.com/kubectl/v1.17.5/linux-amd64-v1.17.5-kubectl
#chmod +x linux-amd64-v1.17.5-kubectl && sudo mv linux-amd64-v1.17.5-kubectl /usr/bin/kubectl

mv linux-amd64-v1.17.5-kubectl kubectl 
chmod +x kubectl && sudo  mv kubectl /usr/bin/kubectl

配置用户文件

mkdir ~/.kube
cp /home/rancher/kube_config_cluster.yml ~/.kube/config

5.4. kubectl 自动补全

将kubectl自动补全添加到配置文件中,可以在以后的shell中自动加载它
# 若要将kubectl自动补全添加到当前shell

echo "source <(kubectl completion bash)" >> ~/.bashrc
source <(kubectl completion bash)

image.png

[rancher@rmaster01 ~]$ docker image ls |grep rancher
rancher/rke-tools                   v0.1.72             9227cf8d7365        13 days ago         193MB
rancher/hyperkube                   v1.19.8-rancher1    bcb034aba24d        3 weeks ago         1.51GB
cnrancher/rancher-agent             v2.4.13-ent2        a39a5ae4535d        5 weeks ago         293MB
rancher/calico-node                 v3.16.5             c1fa37765208        4 months ago        163MB
rancher/calico-pod2daemon-flexvol   v3.16.5             178cfd5d2400        4 months ago        21.9MB
rancher/calico-cni                  v3.16.5             9165569ec236        4 months ago        133MB
rancher/coreos-flannel              v0.13.0-rancher1    0bfefe9f649b        5 months ago        57.5MB
rancher/coreos-etcd                 v3.4.13-rancher1    7a8adaf3e7ad        6 months ago        83.8MB
rancher/prom-node-exporter          v1.0.1              0e0218889c33        9 months ago        26.4MB
rancher/pause                       3.2                 e004ddc1b078        13 months ago       683kB
[rancher@rmaster01 ~]$ docker container ls |grep rancher
ae54c31ea310        rancher/pause:3.2                      "/pause"                 7 hours ago         Up 7 hours                              k8s_POD_canal-wczbn_kube-system_57f5d36a-7394-4e0a-899e-b5024c146ae6_2
2ca1cdc27b61        rancher/pause:3.2                      "/pause"                 7 hours ago         Up 7 hours                              k8s_POD_exporter-node-cluster-monitoring-msmqz_cattle-prometheus_eae3cad4-f04b-4b91-91f6-c658dcc408ce_1
bd9f2400ceb2        rancher/pause:3.2                      "/pause"                 7 hours ago         Up 7 hours                              k8s_POD_cattle-node-agent-8rdtr_cattle-system_29eaac0f-3587-4fa8-9534-a77a3d683f63_1
c18d2b38a6b6        rancher/hyperkube:v1.19.8-rancher1     "/opt/rke-tools/entr…"   10 days ago         Up 7 hours                              kube-proxy
ccf47158175f        rancher/hyperkube:v1.19.8-rancher1     "/opt/rke-tools/entr…"   10 days ago         Up 7 hours                              kubelet
7dc7d8fec2a3        rancher/hyperkube:v1.19.8-rancher1     "/opt/rke-tools/entr…"   10 days ago         Up 7 hours                              kube-scheduler
147757246e6d        rancher/hyperkube:v1.19.8-rancher1     "/opt/rke-tools/entr…"   10 days ago         Up 7 hours                              kube-controller-manager
4ebf55c050f0        rancher/hyperkube:v1.19.8-rancher1     "/opt/rke-tools/entr…"   10 days ago         Up 7 hours                              kube-apiserver
c93210bbcacc        rancher/rke-tools:v0.1.72              "/docker-entrypoint.…"   10 days ago         Up 7 hours                              etcd-rolling-snapshots
e073d4c5266b        rancher/coreos-etcd:v3.4.13-rancher1   "/usr/local/bin/etcd…"   10 days ago         Up 7 hours                              etcd
[rancher@rmaster01 ~]$

1.gif

helm 安装rancher

[rancher@rmaster01 ~]$ kubectl create namespace cattle-system
namespace "cattle-system" created
[rancher@rmaster01 ~]$ kubectl get ns
NAME              STATUS    AGE
cattle-system     Active    5s
default           Active    23m
ingress-nginx     Active    22m
kube-node-lease   Active    23m
kube-public       Active    23m
kube-system       Active    23m
[rancher@rmaster01 ~]$ ll
total 122456
-rw-r----- 1 rancher rancher   119466 May  7 09:10 cluster.rkestate
-rw-rw-r-- 1 rancher rancher      561 May  7 09:07 cluster.yaml
-rw-rw-r-- 1 rancher rancher 12925372 Apr 23 00:20 helm-v3.2.0-linux-amd64.tar.gz
-rw-r----- 1 rancher rancher     5385 May  7 09:08 kube_config_cluster.yaml
drwxr-xr-x 2 rancher rancher     4096 Apr 23 00:19 linux-amd64
-rw-rw-r-- 1 rancher rancher 72497289 Apr 30 19:04 linux-amd64-v1.7.16-kubectl
-rw-rw-r-- 1 rancher rancher     4798 Apr 30 19:13 rancher-2.3.6.tgz
-rwxrwxr-x 1 rancher rancher 39818473 May  6 17:22 rke_linux-amd64
[rancher@rmaster01 ~]$ tar xf rancher-2.3.6.tgz 
[rancher@rmaster01 ~]$ 
[rancher@rmaster01 ~]$ ll
total 122460
-rw-r----- 1 rancher rancher   119466 May  7 09:10 cluster.rkestate
-rw-rw-r-- 1 rancher rancher      561 May  7 09:07 cluster.yaml
-rw-rw-r-- 1 rancher rancher 12925372 Apr 23 00:20 helm-v3.2.0-linux-amd64.tar.gz
-rw-r----- 1 rancher rancher     5385 May  7 09:08 kube_config_cluster.yaml
drwxr-xr-x 2 rancher rancher     4096 Apr 23 00:19 linux-amd64
-rw-rw-r-- 1 rancher rancher 72497289 Apr 30 19:04 linux-amd64-v1.7.16-kubectl
drwxrwxr-x 3 rancher rancher     4096 May  7 09:35 rancher
-rw-rw-r-- 1 rancher rancher     4798 Apr 30 19:13 rancher-2.3.6.tgz
-rwxrwxr-x 1 rancher rancher 39818473 May  6 17:22 rke_linux-amd64
[rancher@rmaster01 ~]$ 
[rancher@rmaster01 ~]$ helm install rancher rancher/   --namespace cattle-system --set rancherImage=cnrancher/rancher --set service.type=NodePort --set service.ports.nodePort=30001 --set tls=internal --set privateCA=true
NAME: rancher
LAST DEPLOYED: Thu May  7 09:35:56 2020
NAMESPACE: cattle-system
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Rancher Server has been installed.

NOTE: Rancher may take several minutes to fully initialize. Please standby while Certificates are being issued and Ingress comes up.

Check out our docs at https://rancher.com/docs/rancher/v2.x/en/

Browse to https://

Happy Containering!
[rancher@rmaster01 ~]$ kubectl get pod 
No resources found.
[rancher@rmaster01 ~]$ kubectl get pod -n cattle-system 
NAME                       READY     STATUS              RESTARTS   AGE
rancher-5dd7f7dd8b-2twc7   0/1       ContainerCreating   0          27s
rancher-5dd7f7dd8b-4ks6m   0/1       ContainerCreating   0          27s
rancher-5dd7f7dd8b-xdxbl   0/1       ContainerCreating   0          27s