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.

64 lines
2.3 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. vars:
  30. ansible_ssh_pipelining: true
  31. gather_facts: true
  32. - hosts: k8s-cluster:etcd:calico-rr
  33. any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
  34. roles:
  35. - { role: kubespray-defaults}
  36. - { role: kubernetes/preinstall, tags: preinstall }
  37. - name: Handle upgrades to master components first to maintain backwards compat.
  38. hosts: kube-master
  39. any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
  40. serial: 1
  41. roles:
  42. - { role: kubespray-defaults}
  43. - { role: upgrade/pre-upgrade, tags: pre-upgrade }
  44. - { role: kubernetes/node, tags: node }
  45. - { role: kubernetes/master, tags: master, upgrade_cluster_setup: true }
  46. - { role: kubernetes/client, tags: client }
  47. - { role: kubernetes-apps/cluster_roles, tags: cluster-roles }
  48. - { role: upgrade/post-upgrade, tags: post-upgrade }
  49. - name: Finally handle worker upgrades, based on given batch size
  50. hosts: kube-node:!kube-master
  51. any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
  52. serial: "{{ serial | default('20%') }}"
  53. roles:
  54. - { role: kubespray-defaults}
  55. - { role: upgrade/pre-upgrade, tags: pre-upgrade }
  56. - { role: kubernetes/node, tags: node }
  57. - { role: upgrade/post-upgrade, tags: post-upgrade }
  58. - { role: kubespray-defaults}