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.

63 lines
2.3 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: kubernetes/client, tags: client }
  46. - { role: kubernetes-apps/cluster_roles, tags: cluster-roles }
  47. - { role: upgrade/post-upgrade, tags: post-upgrade }
  48. #Finally handle worker upgrades, based on given batch size
  49. - hosts: kube-node:!kube-master
  50. any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
  51. serial: "{{ serial | default('20%') }}"
  52. roles:
  53. - { role: kubespray-defaults}
  54. - { role: upgrade/pre-upgrade, tags: pre-upgrade }
  55. - { role: kubernetes/node, tags: node }
  56. - { role: upgrade/post-upgrade, tags: post-upgrade }
  57. - { role: kubespray-defaults}