Merge pull request #2859 from riverzhang/nginx
Fix nginx-proxy HA when kubeadm enable
This commit is contained in:
commit
10c9fe96b0
1 changed files with 4 additions and 4 deletions
|
@ -53,10 +53,10 @@
|
||||||
timeout: 60
|
timeout: 60
|
||||||
|
|
||||||
- name: Update server field in kubelet kubeconfig
|
- name: Update server field in kubelet kubeconfig
|
||||||
replace:
|
lineinfile:
|
||||||
path: "{{ kube_config_dir }}/kubelet.conf"
|
dest: "{{ kube_config_dir }}/kubelet.conf"
|
||||||
regexp: '(\s+)https://{{ first_kube_master }}:{{ kube_apiserver_port }}(\s+.*)?$'
|
regexp: 'server:'
|
||||||
replace: '\1{{ kube_apiserver_endpoint }}\2'
|
line: ' server: {{ kube_apiserver_endpoint }}'
|
||||||
backup: yes
|
backup: yes
|
||||||
when: not is_kube_master and kubeadm_discovery_address != kube_apiserver_endpoint
|
when: not is_kube_master and kubeadm_discovery_address != kube_apiserver_endpoint
|
||||||
notify: restart kubelet
|
notify: restart kubelet
|
||||||
|
|
Loading…
Reference in a new issue