mirror of https://github.com/easzlab/kubeasz.git
15 lines
456 B
YAML
15 lines
456 B
YAML
- hosts: kube-master
|
|
roles:
|
|
- kube-master
|
|
- kube-node
|
|
# 禁止业务 pod调度到 master节点
|
|
tasks:
|
|
- name: 禁止业务 pod调度到 master节点
|
|
shell: "{{ bin_dir }}/kubectl cordon {{ inventory_hostname }} "
|
|
when: DEPLOY_MODE != "allinone"
|
|
ignore_errors: true
|
|
|
|
- name: 设置master节点role
|
|
shell: "{{ bin_dir }}/kubectl label node {{ inventory_hostname }} kubernetes.io/role=master --overwrite"
|
|
ignore_errors: true
|