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
1.7 KiB

  1. Upgrading Kubernetes in Kargo
  2. =============================
  3. #### Description
  4. Kargo handles upgrades the same way it handles initial deployment. That is to
  5. say that each component is laid down in a fixed order. You should be able to
  6. upgrade from Kargo tag 2.0 up to the current master without difficulty. You can
  7. also individually control versions of components by explicitly defining their
  8. versions. Here are all version vars for each component:
  9. * docker_version
  10. * kube_version
  11. * etcd_version
  12. * calico_version
  13. * calico_cni_version
  14. * weave_version
  15. * flannel_version
  16. * kubedns_version
  17. #### Unsafe upgrade example
  18. If you wanted to upgrade just kube_version from v1.4.3 to v1.4.6, you could
  19. deploy the following way:
  20. ```
  21. ansible-playbook cluster.yml -i inventory/inventory.cfg -e kube_version=v1.4.3
  22. ```
  23. And then repeat with v1.4.6 as kube_version:
  24. ```
  25. ansible-playbook cluster.yml -i inventory/inventory.cfg -e kube_version=v1.4.6
  26. ```
  27. #### Graceful upgrade
  28. Kargo also supports cordon, drain and uncordoning of nodes when performing
  29. a cluster upgrade. There is a separate playbook used for this purpose. It is
  30. important to note that upgrade-cluster.yml can only be used for upgrading an
  31. existing cluster. That means there must be at least 1 kube-master already
  32. deployed.
  33. ```
  34. git fetch origin
  35. git checkout origin/master
  36. ansible-playbook upgrade-cluster.yml -b -i inventory/inventory.cfg
  37. ```
  38. #### Upgrade order
  39. As mentioned above, components are upgraded in the order in which they were
  40. installed in the Ansible playbook. The order of component installation is as
  41. follows:
  42. * Docker
  43. * etcd
  44. * kubelet and kube-proxy
  45. * network_plugin (such as Calico or Weave)
  46. * kube-apiserver, kube-scheduler, and kube-controller-manager
  47. * Add-ons (such as KubeDNS)