Upgrading Managed Nodes to a Newer Kubernetes Version

Find out about the different ways to upgrade the Kubernetes version on managed nodes in clusters you've created with Container Engine for Kubernetes (OKE).

Note

This section applies to managed nodes only. For information about upgrading self-managed nodes, see Upgrading Self-Managed Nodes to a Newer Kubernetes Version by Replacing an Existing Self-Managed Node.

You can upgrade the version of Kubernetes running on the managed nodes in a cluster in the following ways:

  • Perform an 'in-place' upgrade, by specifying a more recent Kubernetes version for new managed nodes starting in the existing node pool, and then cycling the nodes to automatically replace all existing managed nodes. First, you modify the existing node pool's properties to specify the more recent Kubernetes version. Then, you cycle the nodes in the node pool, specifying both a maximum allowed number of new nodes that can be created during the operation, and a maximum allowed number of nodes that can be unavailable. Container Engine for Kubernetes automatically cordons, drains, and terminates existing worker nodes, and creates new nodes. When new managed nodes are started in the existing node pool, they run the more recent Kubernetes version you specified. See Performing an In-Place Managed Node Kubernetes Upgrade by Cycling Nodes in an Existing Node Pool.
  • Perform an 'in-place' upgrade, by specifying a more recent Kubernetes version for new managed nodes starting in the existing node pool, and then manually replacing each existing node with a new managed node. First, you modify the existing node pool's properties to specify the more recent Kubernetes version. Then, you delete each managed node in turn, selecting appropriate cordon and drain options to prevent new pods starting and to delete existing pods. You start a new managed node to take the place of each managed node you delete. When new managed nodes are started in the existing node pool, they run the more recent Kubernetes version you specified. See Performing an In-Place Managed Node Kubernetes Upgrade by Manually Replacing Nodes an Existing Node Pool.
  • Perform an 'out-of-place' upgrade, by replacing the original node pool with a new node pool. First, you create a new node pool with a more recent Kubernetes version. Then, you drain existing managed nodes in the original node pool to prevent new pods starting, and to delete existing pods. Finally, you delete the original node pool. When new managed nodes are started in the new node pool, they run the more recent Kubernetes version you specified. See Performing an Out-of-Place Managed Node Kubernetes Upgrade by Replacing an Existing Node Pool with a New Node Pool.

Note that in all cases:

  • The more recent Kubernetes version you specify for the managed nodes in the node pool must be compatible with the Kubernetes version running on the control plane nodes in the cluster. See Upgrading Clusters to Newer Kubernetes Versions.
  • You must drain existing managed nodes in the original node pool. If you don't drain the managed nodes, workloads running on the cluster are subject to disruption.