Oracle Cloud Infrastructure Documentation

About Upgrading Clusters to Newer Kubernetes Versions

After a new version of Kubernetes has been released and when Container Engine for Kubernetes supports the new version, you can use Container Engine for Kubernetes to upgrade master nodes running older versions of Kubernetes.

Having upgraded master nodes to a new version of Kubernetes, you can subsequently create new node pools running the newer version. Alternatively, you can continue to create new node pools that will run older versions of Kubernetes (providing those older versions are compatible with the Kubernetes version running on the master nodes).

Note that you upgrade master nodes by performing an ‘in-place’ upgrade, but you upgrade worker nodes by performing an ‘out-of-place’ upgrade. To upgrade the version of Kubernetes running on worker nodes in a node pool, you replace the original node pool with a new node pool that has new worker nodes running the appropriate Kubernetes version. Having 'drained' existing worker nodes in the original node pool to prevent new pods starting and to delete existing pods, you can then delete the original node pool.

Also note the following:

  • Container Engine for Kubernetes only upgrades the Kubernetes version running on master nodes when you explicitly initiate the upgrade operation.
  • After upgrading master nodes to a newer version of Kubernetes, you cannot downgrade the master nodes to an earlier Kubernetes version.
  • Before you upgrade the version of Kubernetes running on the master nodes, it is your responsibility to test that applications deployed on the cluster are compatible with the new Kubernetes version. For example, before upgrading the existing cluster, you might create a new separate cluster with the new Kubernetes version to test your applications.
  • The versions of Kubernetes running on the master nodes and the worker nodes must be compatible (that is, the Kubernetes version on the master nodes must be no more than two minor versions ahead of the Kubernetes version on the worker nodes).
  • If the version of Kubernetes currently running on the master nodes is more than one version behind the most recent supported version, you are given a choice of versions to upgrade to. If you want to upgrade to a version of Kubernetes that is more than one version ahead of the version currently running on the master nodes, you must upgrade to each intermediate version in sequence without skipping versions. For example, if you want to upgrade the master nodes from Kubernetes version 1.9 to Kubernetes version 1.11, you must first upgrade the master nodes from version 1.9 to version 1.10, and then from version 1.10 to version 1.11.