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.

58 lines
2.2 KiB

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