快速部署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
快速部署Rancher2.x

创建kubernetes集群

上一篇:阿里云的短信服务acsClient+java


下一篇:CentOS 7配置Chrony服务进行时间同步