机器准备

        30.128  四层代理服务器   节点上需要安装rke kubectl helm nginx

                     128节点需要和其它三个节点建立ssh互信实现免密登录 rke是通过ssh登录来远程操作其它节点的

                     128主机名设置为cf.rancher.com

        30.110  k8s-node1

        30.112  k8s-node2

        30.113  k8s-node3

                  110,112,113三个节点通过rke部署一个k8s集群 这个集群只用来运行Rancher Server实现Rancher Server的高可用

rke安装k8s

           安装     rke up --config=./rancher-cluster.yml

           卸载    rke remove --config=./rancher-cluster.yml

nodes:
  - address: 192.168.30.110
    user: admin
    role: [controlplane,worker,etcd]
  - address: 192.168.30.129
    user: admin
    role: [controlplane,worker,etcd]
  - address: 192.168.30.133
    user: admin
    role: [controlplane,worker,etcd]

services:
  etcd:
    snapshot: true
    creation: 6h
    retention: 24h

ingress:
  provider: nginx
  options:
    use-forwarded-headers: "true"
rancher-cluster.yml

相关文章: