kubeasz/playbooks/04.kube-master.yml

16 lines
482 B
YAML
Raw Normal View History

# to set up 'kube_master' nodes
- hosts: kube_master
2017-11-11 19:14:21 +08:00
roles:
- kube-lb
2017-11-11 19:14:21 +08:00
- kube-master
- kube-node
tasks:
- name: Making master nodes SchedulingDisabled
shell: "{{ bin_dir }}/kubectl cordon {{ inventory_hostname }} "
when: "inventory_hostname not in groups['kube_node']"
ignore_errors: true
- name: Setting master role name
shell: "{{ bin_dir }}/kubectl label node {{ inventory_hostname }} kubernetes.io/role=master --overwrite"
2018-05-22 15:57:44 +08:00
ignore_errors: true