Kubespray节点伸缩
环境说明伸缩前:主机名IP地址操作系统内核角色node1192.168.100.11CentOS-7.13.10K8S-masternode2192.168.111.12CentOS-7.13.10K8S-node伸缩后:主机名IP地址操作系统内核角色node1192.168.100.11CentOS-7.13.10K8S-masternode2192.168.111.12CentOS-7.13.
·
环境说明
伸缩前:
主机名 | IP地址 | 操作系统 | 内核 | 角色 |
---|---|---|---|---|
node1 | 192.168.100.11 | CentOS-7.1 | 3.10 | K8S-master |
node2 | 192.168.111.12 | CentOS-7.1 | 3.10 | K8S-node |
伸缩后:
主机名 | IP地址 | 操作系统 | 内核 | 角色 |
---|---|---|---|---|
node1 | 192.168.100.11 | CentOS-7.1 | 3.10 | K8S-master |
node2 | 192.168.111.12 | CentOS-7.1 | 3.10 | K8S-node |
node3 | 192.168.111.13 | CentOS-7.1 | 3.10 | K8S-node |
操作步骤
配置主机文件
配置前:
[all] node1 ansible_host=192.168.100.11 ansible_user=root ip=192.168.100.11 node2 ansible_host=192.168.100.12 ansible_user=root ip=192.168.100.12 [kube-master] node1 [kube-node] node2 [etcd] node1 [k8s-cluster:children] kube-node kube-master
配置后:
[all]
node1 ansible_host=192.168.100.11 ansible_user=root ip=192.168.100.11 node2 ansible_host=192.168.100.12 ansible_user=root ip=192.168.100.12 node3 ansible_host=192.168.100.13 ansible_user=root ip=192.168.100.13 [kube-master] node1 [kube-node] node2 node3 [etcd] node1 [k8s-cluster:children] kube-node kube-master
伸缩节点
$ ansible-playbook -i inventory/inventory.cfg scale.yml -b -v
参考
https://github.com/kubernetes-incubator/kubespray/blob/master/docs/getting-started.md
更多推荐
已为社区贡献152条内容
所有评论(0)