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.

61 lines
2.2 KiB

  1. ### NOTE: This playbook cannot be used to deploy any new nodes to the cluster.
  2. ### Additional information:
  3. ### * Will not upgrade etcd
  4. ### * Will not upgrade network plugins
  5. ### * Will not upgrade Docker
  6. ### * Will not pre-download containers or kubeadm
  7. ### * Currently does not support Vault deployment.
  8. ###
  9. ### In most cases, you probably want to use upgrade-cluster.yml playbook and
  10. ### not this one.
  11. - hosts: localhost
  12. gather_facts: False
  13. roles:
  14. - { role: kubespray-defaults}
  15. - { role: bastion-ssh-config, tags: ["localhost", "bastion"]}
  16. - hosts: k8s-cluster:etcd:calico-rr
  17. any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
  18. gather_facts: false
  19. vars:
  20. # Need to disable pipelining for bootstrap-os as some systems have requiretty in sudoers set, which makes pipelining
  21. # fail. bootstrap-os fixes this on these systems, so in later plays it can be enabled.
  22. ansible_ssh_pipelining: false
  23. roles:
  24. - { role: kubespray-defaults}
  25. - { role: bootstrap-os, tags: bootstrap-os}
  26. - hosts: k8s-cluster:etcd:calico-rr
  27. any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
  28. vars:
  29. ansible_ssh_pipelining: true
  30. gather_facts: true
  31. - hosts: k8s-cluster:etcd:calico-rr
  32. any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
  33. roles:
  34. - { role: kubespray-defaults}
  35. - { role: kubernetes/preinstall, tags: preinstall }
  36. #Handle upgrades to master components first to maintain backwards compat.
  37. - hosts: kube-master
  38. any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
  39. serial: 1
  40. roles:
  41. - { role: kubespray-defaults}
  42. - { role: upgrade/pre-upgrade, tags: pre-upgrade }
  43. - { role: kubernetes/node, tags: node }
  44. - { role: kubernetes/master, tags: master }
  45. - { role: upgrade/post-upgrade, tags: post-upgrade }
  46. #Finally handle worker upgrades, based on given batch size
  47. - hosts: kube-node:!kube-master
  48. any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
  49. serial: "{{ serial | default('20%') }}"
  50. roles:
  51. - { role: kubespray-defaults}
  52. - { role: upgrade/pre-upgrade, tags: pre-upgrade }
  53. - { role: kubernetes/node, tags: node }
  54. - { role: upgrade/post-upgrade, tags: post-upgrade }
  55. - { role: kubespray-defaults}