Fix PATH for kubeadm init

Right now we're consistently getting warnings about kubelet not found in
path during `kubeadm init`. We fixed this for `kubeadm join` in #3342, and this brings the change to init
as well.
This commit is contained in:
Chad Swenson 2019-01-09 18:38:02 -06:00
parent 4fb8adb9e4
commit aa1d5b8970

View file

@ -108,6 +108,8 @@
retries: 3 retries: 3
when: inventory_hostname == groups['kube-master']|first and not kubeadm_already_run.stat.exists when: inventory_hostname == groups['kube-master']|first and not kubeadm_already_run.stat.exists
failed_when: kubeadm_init.rc != 0 and "field is immutable" not in kubeadm_init.stderr failed_when: kubeadm_init.rc != 0 and "field is immutable" not in kubeadm_init.stderr
environment:
PATH: "{{ bin_dir }}:{{ ansible_env.PATH }}"
notify: Master | restart kubelet notify: Master | restart kubelet
- name: slurp kubeadm certs - name: slurp kubeadm certs
@ -155,6 +157,8 @@
until: kubeadm_init is succeeded or "field is immutable" in kubeadm_init.stderr until: kubeadm_init is succeeded or "field is immutable" in kubeadm_init.stderr
when: inventory_hostname != groups['kube-master']|first and not kubeadm_already_run.stat.exists when: inventory_hostname != groups['kube-master']|first and not kubeadm_already_run.stat.exists
failed_when: kubeadm_init.rc != 0 and "field is immutable" not in kubeadm_init.stderr failed_when: kubeadm_init.rc != 0 and "field is immutable" not in kubeadm_init.stderr
environment:
PATH: "{{ bin_dir }}:{{ ansible_env.PATH }}"
notify: Master | restart kubelet notify: Master | restart kubelet
- name: kubeadm | upgrage kubernetes cluster - name: kubeadm | upgrage kubernetes cluster