其他分享
首页 > 其他分享> > 快速部署Rancher2.x

快速部署Rancher2.x

作者:互联网

准备

安装docker
停止&删除容器(非必须)

docker stop $(docker ps -a -q)
docker  rm $(docker ps -a -q)

关闭防火墙

systemctl stop firewalld && systemctl disable firewalld

关闭SELinux

setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

关闭swap

swapoff -a

重启docker

sudo systemctl daemon-reload
sudo systemctl restart docker

安装启动Rancher

挂载服务器的ranche目录/home/txl/rancher,映射8080和8443端口

docker run -itd --privileged  -p 8080:80 -p 8443:443 \
-v /home/txl/rancher:/var/lib/rancher \
--restart=unless-stopped  -e CATTLE_AGENT_IMAGE="registry.cn-hangzhou.aliyuncs.com/rancher/rancher-agent:v2.4.8"  registry.cn-hangzhou.aliyuncs.com/rancher/rancher:v2.4.8

登录rancher设置密码及Rancher Server Url

必须是内网ip
image

创建kubernetes集群

标签:aliyuncs,txl,cn,Rancher2,部署,systemctl,rancher,docker,快速
来源: https://www.cnblogs.com/tangxuliang/p/15588423.html