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.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. - name: Setup ssh config to use the bastion
  13. hosts: localhost
  14. gather_facts: False
  15. roles:
  16. - { role: kubespray-defaults}
  17. - { role: bastion-ssh-config, tags: ["localhost", "bastion"]}
  18. - name: Bootstrap hosts OS for Ansible
  19. hosts: k8s_cluster:etcd:calico_rr
  20. any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
  21. gather_facts: false
  22. vars:
  23. # Need to disable pipelining for bootstrap-os as some systems have requiretty in sudoers set, which makes pipelining
  24. # fail. bootstrap-os fixes this on these systems, so in later plays it can be enabled.
  25. ansible_ssh_pipelining: false
  26. roles:
  27. - { role: kubespray-defaults}
  28. - { role: bootstrap-os, tags: bootstrap-os}
  29. - name: Preinstall
  30. hosts: k8s_cluster:etcd:calico_rr
  31. any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
  32. roles:
  33. - { role: kubespray-defaults}
  34. - { role: kubernetes/preinstall, tags: preinstall }
  35. - name: Handle upgrades to master components first to maintain backwards compat.
  36. hosts: kube_control_plane
  37. any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
  38. serial: 1
  39. roles:
  40. - { role: kubespray-defaults}
  41. - { role: upgrade/pre-upgrade, tags: pre-upgrade }
  42. - { role: kubernetes/node, tags: node }
  43. - { role: kubernetes/control-plane, tags: master, upgrade_cluster_setup: true }
  44. - { role: kubernetes/client, tags: client }
  45. - { role: kubernetes-apps/cluster_roles, tags: cluster-roles }
  46. - { role: upgrade/post-upgrade, tags: post-upgrade }
  47. - name: Finally handle worker upgrades, based on given batch size
  48. hosts: kube_node:!kube_control_plane
  49. any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
  50. serial: "{{ serial | default('20%') }}"
  51. roles:
  52. - { role: kubespray-defaults}
  53. - { role: upgrade/pre-upgrade, tags: pre-upgrade }
  54. - { role: kubernetes/node, tags: node }
  55. - { role: upgrade/post-upgrade, tags: post-upgrade }
  56. - { role: kubespray-defaults}