Adjust endpoints for kube-proxy,controller,scheduler to proper ip (#5150)

Change-Id: I5aa009358bee7035922b5a10327997e47c9ba434
This commit is contained in:
Matthew Mosesohn
2019-09-09 20:33:20 +03:00
committed by Kubernetes Prow Robot
parent 5f02068f90
commit 9b0f57a0a6
3 changed files with 19 additions and 1 deletions

View File

@@ -104,10 +104,12 @@
- kubeadm_discovery_address != kube_apiserver_endpoint | replace("https://", "")
notify: restart kubelet
# FIXME(mattymo): Need to point to localhost, otherwise masters will all point
# incorrectly to first master, creating SPoF.
- name: Update server field in kube-proxy kubeconfig
shell: >-
{{ bin_dir }}/kubectl --kubeconfig {{ kube_config_dir }}/admin.conf get configmap kube-proxy -n kube-system -o yaml
| sed 's#server:.*#server:\ {{ kube_apiserver_endpoint }}#g'
| sed 's#server:.*#server: https://127.0.0.1:{{ kube_apiserver_port }}#g'
| {{ bin_dir }}/kubectl --kubeconfig {{ kube_config_dir }}/admin.conf replace -f -
run_once: true
when: