kubeasz/04.kube-master.yml

17 lines
540 B
YAML
Raw Normal View History

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