Fix kube-proxy on master

This commit is contained in:
Smaine Kahlouch 2015-11-30 16:41:22 +01:00
parent 97c4edc028
commit 126d4e36c8
3 changed files with 7 additions and 5 deletions

View file

@ -45,8 +45,11 @@
- name: write the kubecfg (auth) file for kubectl - name: write the kubecfg (auth) file for kubectl
template: src=kubectl.kubeconfig.j2 dest={{ kube_config_dir }}/kubectl.kubeconfig backup=yes template: src=kubectl.kubeconfig.j2 dest={{ kube_config_dir }}/kubectl.kubeconfig backup=yes
- name: write the config files for proxy - name: Create proxy environment vars dir
template: src=proxy.j2 dest={{ kube_config_dir }}/proxy backup=yes file: path=/etc/systemd/system/kube-proxy.service.d state=directory
- name: Write proxy config file
template: src=proxy.j2 dest=/etc/systemd/system/kube-proxy.service.d/10-proxy-cluster.conf backup=yes
notify: notify:
- restart proxy - restart proxy

View file

@ -4,4 +4,5 @@
# default config should be adequate # default config should be adequate
# Add your own! # Add your own!
KUBE_PROXY_ARGS="--kubeconfig={{ kube_config_dir }}/proxy.kubeconfig --proxy-mode={{kube_proxy_mode}}" [Service]
Environment="KUBE_PROXY_ARGS=--kubeconfig={{ kube_config_dir }}/proxy.kubeconfig --proxy-mode={{kube_proxy_mode}}"

View file

@ -20,7 +20,6 @@
- name: Write kubelet config file - name: Write kubelet config file
template: src=kubelet.j2 dest=/etc/systemd/system/kubelet.service.d/10-kubelet.conf backup=yes template: src=kubelet.j2 dest=/etc/systemd/system/kubelet.service.d/10-kubelet.conf backup=yes
notify: notify:
- reload systemd
- restart kubelet - restart kubelet
- name: write the kubecfg (auth) file for kubelet - name: write the kubecfg (auth) file for kubelet
@ -34,7 +33,6 @@
- name: Write proxy config file - name: Write proxy config file
template: src=proxy.j2 dest=/etc/systemd/system/kube-proxy.service.d/10-proxy-cluster.conf backup=yes template: src=proxy.j2 dest=/etc/systemd/system/kube-proxy.service.d/10-proxy-cluster.conf backup=yes
notify: notify:
- reload systemd
- restart proxy - restart proxy
- name: write the kubecfg (auth) file for kube-proxy - name: write the kubecfg (auth) file for kube-proxy