增加节点脚本20.addnode.yml

pull/275/head
jmgao 2017-11-25 21:37:43 +08:00
parent b904133b13
commit 77079717e3
2 changed files with 18 additions and 0 deletions

13
20.addnode.yml 100644
View File

@ -0,0 +1,13 @@
- hosts: new-node
roles:
- prepare
- kubectl
- docker
- calico
- kube-node
- hosts: deploy
tasks:
- name: 批准新增node节点
shell: "sleep 15 && {{ bin_dir }}/kubectl get csr|grep 'Pending' | awk 'NR>0{print $1}'| xargs {{ bin_dir }}/kubectl certificate approve"
ignore_errors: true

View File

@ -38,6 +38,11 @@ MASTER_PORT="8443" # api-server 服务端口
kube-node
kube-master
# 预留组后续添加node节点使用
[new-node]
#192.168.1.xx NODE_ID=node6 NODE_IP="192.168.1.xx"
#192.168.1.xx NODE_ID=node7 NODE_IP="192.168.1.xx"
[all:vars]
# ---------集群主要参数---------------
#集群 MASTER IP, 需要外部负载均衡一般为VIP地址