|
@ -70,7 +70,10 @@ |
|
|
regexp: 'server:' |
|
|
regexp: 'server:' |
|
|
line: ' server: {{ kube_apiserver_endpoint }}' |
|
|
line: ' server: {{ kube_apiserver_endpoint }}' |
|
|
backup: yes |
|
|
backup: yes |
|
|
when: not is_kube_master and kubeadm_discovery_address != kube_apiserver_endpoint |
|
|
|
|
|
|
|
|
when: |
|
|
|
|
|
- kubeadm_config_api_fqdn is not defined |
|
|
|
|
|
- not is_kube_master |
|
|
|
|
|
- kubeadm_discovery_address != kube_apiserver_endpoint |
|
|
notify: restart kubelet |
|
|
notify: restart kubelet |
|
|
|
|
|
|
|
|
- name: Update server field in kube-proxy kubeconfig |
|
|
- name: Update server field in kube-proxy kubeconfig |
|
@ -80,10 +83,16 @@ |
|
|
| {{ bin_dir }}/kubectl replace -f - |
|
|
| {{ bin_dir }}/kubectl replace -f - |
|
|
delegate_to: "{{groups['kube-master']|first}}" |
|
|
delegate_to: "{{groups['kube-master']|first}}" |
|
|
run_once: true |
|
|
run_once: true |
|
|
when: is_kube_master and kubeadm_discovery_address != kube_apiserver_endpoint |
|
|
|
|
|
|
|
|
when: |
|
|
|
|
|
- kubeadm_config_api_fqdn is not defined |
|
|
|
|
|
- is_kube_master |
|
|
|
|
|
- kubeadm_discovery_address != kube_apiserver_endpoint |
|
|
|
|
|
|
|
|
- name: Restart all kube-proxy pods to ensure that they load the new configmap |
|
|
- name: Restart all kube-proxy pods to ensure that they load the new configmap |
|
|
shell: "{{ bin_dir }}/kubectl delete pod -n kube-system -l k8s-app=kube-proxy" |
|
|
shell: "{{ bin_dir }}/kubectl delete pod -n kube-system -l k8s-app=kube-proxy" |
|
|
delegate_to: "{{groups['kube-master']|first}}" |
|
|
delegate_to: "{{groups['kube-master']|first}}" |
|
|
run_once: true |
|
|
run_once: true |
|
|
when: is_kube_master and kubeadm_discovery_address != kube_apiserver_endpoint |
|
|
|
|
|
|
|
|
when: |
|
|
|
|
|
- kubeadm_config_api_fqdn is not defined |
|
|
|
|
|
- is_kube_master |
|
|
|
|
|
- kubeadm_discovery_address != kube_apiserver_endpoint |