1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| yum update -y
docker rm -f $(docker ps -aq) docker volume rm $(docker volume list -q) rm -rf /var/lib/rancher /opt/cni /opt/containerd /opt/rke systemctl stop firewalld systemctl disable firewalld systemctl daemon-reload systemctl restart docker
docker volume create rancher-data --label app=rancher docker volume create rancher-log --label app=rancher docker run -d --name=rancher-v2 --restart=unless-stopped \ -p 8080:80 -p 8443:443 \ -v rancher-data:/var/lib/rancher \ -v rancher-log:/var/log/auditlog \ -e AUDIT_LEVEL=3 \ rancher/rancher:v2.2.8
sudo docker run -d --privileged --restart=unless-stopped --net=host -v /etc/kubernetes:/etc/kubernetes -v /var/run:/var/run rancher/rancher-agent:v2.2.8 --server ${IP} --token 8szs8xxgct5nmkl4dj9mqxpx4zrkf8c6j2blgb4jnj2kt5gp68cd9l --ca-checksum 14fc99cae672173b41e564f9389d1ef57dfcb5fdb1d204c615dcf01b5bb6575c --etcd --controlplane --worker
|