You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.1 KiB

  1. ---
  2. - name: kubeadm | Upgrade first master
  3. command: >-
  4. timeout -k 600s 600s
  5. {{ bin_dir }}/kubeadm
  6. upgrade apply -y {{ kube_version }}
  7. --config={{ kube_config_dir }}/kubeadm-config.yaml
  8. --ignore-preflight-errors=all
  9. --allow-experimental-upgrades
  10. --allow-release-candidate-upgrades
  11. --etcd-upgrade=false
  12. --force
  13. register: kubeadm_upgrade
  14. # Retry is because upload config sometimes fails
  15. retries: 3
  16. when: inventory_hostname == groups['kube-master']|first
  17. failed_when: kubeadm_upgrade.rc != 0 and "field is immutable" not in kubeadm_upgrade.stderr
  18. notify: Master | restart kubelet
  19. - name: kubeadm | Upgrade other masters
  20. command: >-
  21. timeout -k 600s 600s
  22. {{ bin_dir }}/kubeadm
  23. upgrade apply -y {{ kube_version }}
  24. --config={{ kube_config_dir }}/kubeadm-config.yaml
  25. --ignore-preflight-errors=all
  26. --allow-experimental-upgrades
  27. --allow-release-candidate-upgrades
  28. --etcd-upgrade=false
  29. register: kubeadm_upgrade
  30. when: inventory_hostname != groups['kube-master']|first
  31. failed_when: kubeadm_upgrade.rc != 0 and "field is immutable" not in kubeadm_upgrade.stderr
  32. notify: Master | restart kubelet