2017-11-11 19:14:21 +08:00
|
|
|
- hosts: kube-master
|
|
|
|
roles:
|
|
|
|
- kube-master
|
2018-03-16 18:23:34 +08:00
|
|
|
- kube-node
|
|
|
|
# 禁止业务 pod调度到 master节点
|
|
|
|
tasks:
|
|
|
|
- name: 禁止业务 pod调度到 master节点
|
2018-06-09 22:19:20 +08:00
|
|
|
shell: "{{ bin_dir }}/kubectl cordon {{ inventory_hostname }} "
|
2018-09-15 11:27:33 +08:00
|
|
|
delegate_to: "{{ groups.deploy[0] }}"
|
2018-03-16 18:23:34 +08:00
|
|
|
when: DEPLOY_MODE != "allinone"
|
|
|
|
ignore_errors: true
|
|
|
|
|
2018-05-22 15:57:44 +08:00
|
|
|
- name: 设置master节点role
|
2018-06-09 22:19:20 +08:00
|
|
|
shell: "{{ bin_dir }}/kubectl label node {{ inventory_hostname }} kubernetes.io/role=master --overwrite"
|
2018-05-22 15:57:44 +08:00
|
|
|
ignore_errors: true
|
2018-09-15 11:27:33 +08:00
|
|
|
delegate_to: "{{ groups.deploy[0] }}"
|