# Performing In-place Upgrade (v1.15 and Later)

#### Scenario

On the CCE console, You can perform an in-place cluster upgrade to use new cluster features.

Before the upgrade, learn about the target version to which each CCE cluster can be upgraded in what ways, and the upgrade impacts. For details, see Overview and Before You Start.

#### Description

- An in-place upgrade updates the Kubernetes components on cluster nodes, without changing their OS version.
- Data plane nodes are upgraded in batches. By default, they are prioritized based on their CPU, memory, and PodDisruptionBudgets (PDBs). You can also set the priorities according to your service requirements.

#### Precautions

- During the cluster upgrade, the system will automatically upgrade add-ons to a version compatible with the target cluster version. Do not uninstall or reinstall add-ons during the cluster upgrade.
- Before the upgrade, ensure that all add-ons are running. If an add-on fails to be upgraded, rectify the fault and try again.
- During the upgrade, CCE checks the add-on running status. Some add-ons (such as coredns) require at least two nodes to run normally. In this case, at least two nodes must be available for the upgrade.

For more information, see Before You Start.

#### Procedure

This section describes how to upgrade a CCE cluster of v1.15 or later. For other versions, see Performing Replace/Rolling Upgrade (v1.13 and Earlier).

1. Log in to the CCE console. In the navigation pane, choose Resource Management > Clusters. In the cluster list, view the cluster version.
2. Click More for the cluster you want to upgrade, and select Upgrade from the drop-down menu.

   Figure 1 Upgrading a cluster
   - If your cluster version is up-to-date, the Upgrade button is grayed out.
   - If the cluster status is Unavailable, the upgrade flag in the upper right corner of the cluster card view will be grayed out. Check the cluster status by referring to Before You Start.
3. (Optional) On the cluster upgrade confirmation page, click Backup to back up the entire master node. This backup mode is recommended.

   A manual confirmation is required for backing up the entire master node. The backup process uses the Cloud Backup and Recovery (CBR) service and takes about 20 minutes. If there are many cloud backup tasks at the current site, the backup time may be prolonged. You are advised to back up the master node.

   Figure 2 Determining whether to back up the entire master node
4. Check the version information, last update/upgrade time, available upgrade version, and upgrade history of the current cluster.

   The cluster upgrade goes through pre-upgrade check, add-on upgrade/uninstallation, master node upgrade, worker node upgrade, and post-upgrade processing.

   Figure 3 Cluster upgrade page
5. Click Upgrade on the right. Set the upgrade parameters.

   - Available Versions: Select v1.19 in this example.
   - Cluster Backup: A manual confirmation is required for backing up the entire master node. The backup process uses the Cloud Backup and Recovery (CBR) service and takes about 20 minutes. If there are many cloud backup tasks at the current site, the backup time may be prolonged.
   - Add-on Upgrade Configuration: Add-ons that have been installed in your cluster are listed. During the cluster upgrade, the system automatically upgrades the add-ons to be compatible with the target cluster version. You can click Set to re-define the add-on parameters.

     If a red dot is displayed on the right of an add-on, the add-on is incompatible with the target cluster version. During the upgrade, the add-on will be uninstalled and then re-installed. Ensure that the add-on parameters are correctly configured.

   - Node Upgrade Configuration: Before setting the node upgrade priority, you need to select a node pool. Nodes and node pools will be upgraded according to the priorities you specify. You can set the maximum number of nodes to be upgraded in batch, or set priorities for nodes to be upgraded. If you do not set this parameter, the system will determine the nodes to upgrade in batches based on specific conditions.
     - Add Upgrade Priority: Add upgrade priorities for node pools.
     - Add Node Priority: After adding a node pool priority, you can set the upgrade sequence of nodes in the node pool. The system upgrades nodes in the sequence you specify. If you skip this setting, the system upgrades nodes based on the default policy.
   Figure 4 Configuring upgrade parameters
6. Read the upgrade instructions carefully, and select I have read the upgrade instructions. Click Upgrade.

   Figure 5 Final step before upgrade
7. After you click Upgrade, the cluster upgrade starts. You can view the upgrade process in the lower part of the page.

   During the upgrade, you can click Suspend on the right to suspend the cluster upgrade. To continue the upgrade, click Continue.

   Figure 6 Cluster upgrade in process
8. When the upgrade progress reaches 100%, the cluster is upgraded. The version information will be properly displayed, and no upgrade is required.

   Figure 7 Upgrade completed
9. After the upgrade is complete, verify the cluster Kubernetes version on the Clusters page.

   Figure 8 Verifying the upgrade success

Parent topic: Upgrading a Cluster