系统准备:centos7.5 Docker容器
Rancher server:172.16.20.52
k8s master:172.16.20.53
k8s worker:172.16.20.54
docker run -itd --name rancher2.5.6 -p 80:80 -p 443:443 \
--privileged=true \
--restart=unless-stopped \
-e CATTLE_AGENT_IMAGE="registry.cn-hangzhou.aliyuncs.com/rancher/rancher-agent:v2.5.6" \
registry.cn-hangzhou.aliyuncs.com/rancher/rancher:v2.5.6

打开web,设置密码

添加集群

复制命令创建master

运行完毕之后,查看master状态


增加Node计算节点,复制命令到计算节点服务器


查看system组件是否处于健康状态

默认kubectl是在web端本地环境没有,现在单独安装kubectl本地来管理

点击kubeconfig文件复制

下载kubectl rpm包,通过阿里镜像源

将文件复制到这个地方,目录没有的话可以创建,然后保存,就可以直接操作了
vim /root/.kube/conf

网友评论