Fix kube system NS provisioning
NS must be created only on the first kube-master.
This commit is contained in:
parent
477afa8711
commit
b292a1ee0b
1 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@
|
|||
|
||||
- name: Check if kube system namespace exists
|
||||
command: "{{ bin_dir }}/kubectl get ns {{system_namespace}}"
|
||||
register: 'kubesystem'
|
||||
register: check_system_ns
|
||||
changed_when: False
|
||||
failed_when: False
|
||||
when: inventory_hostname == groups['kube-master'][0]
|
||||
|
@ -30,7 +30,7 @@
|
|||
register: create_system_ns
|
||||
until: create_system_ns.rc == 0
|
||||
changed_when: False
|
||||
when: kubesystem.rc != 0 and inventory_hostname == groups['kube-master'][0]
|
||||
when: inventory_hostname == groups['kube-master'][0] and check_system_ns|failed
|
||||
tags: apps
|
||||
|
||||
- name: Write kube-scheduler kubeconfig
|
||||
|
|
Loading…
Reference in a new issue