Linux环境:centos7.6
1. 创建挂载目录并授权
mkdir -p /docker_v/rancher/{rancher,log,kubelet,cni}
chmod 777 -R /docker_v/rancher/
2. 最新稳定版(v2.5.16)/k8s(1.20.15)
docker pull rancher/rancher:v2.5.16
3. 启动容器
docker run -d --name rancher --privileged --restart=unless-stopped -p 9000:80 -p 8443:443 \
-v /docker_v/rancher/rancher:/var/lib/rancher \
-v /docker_v/rancher/log:/var/log \
-v /docker_v/rancher/cni:/var/lib/cni \
-v /docker_v/rancher/kubelet:/var/lib/kubelet \
rancher/rancher:v2.5.16
4. 访问ip:8443
https://1.14.125.216:8443/p/c-6p2nk:p-rhlng/workloads
设置登录密码后进入下一步并设置rancher server url【确保集群的每个节点都能访问该地址】
5. 创建集群后,添加主机,在对应主机执行。
标签:log,lib,部署,v2.5,var,rancher,Docker,docker From: https://www.cnblogs.com/df-blog/p/17307670.html