Updated on 2024-06-17 GMT+08:00

Upgrading an On-Premises Cluster

Cluster upgrades improve the lifecycle management of on-premises clusters. You can use the command line tool on the on-premises cluster details page to upgrade the on-premises cluster. You can refer to the prompts and guides provided on the UCS console when you upgrade a cluster.

Constraints

  • To upgrade an on-premises cluster, upgrade the master nodes and components first, and then upgrade the worker nodes.
  • The upgrade prompts on the cluster list page depend on the status of the master nodes. The upgrade needs to be completed at a time. The worker nodes that are not upgraded are not displayed in the cluster list.
  • The version to be upgraded cannot be selected. By default, the cluster is upgraded to the latest version.
  • During the master node upgrade, the cluster on the cluster details page may be unavailable for a short period of time. After the upgrade is complete, the cluster will be connected again.

Upgrade Operations

  1. Log in to the UCS console, select a running cluster to be upgrade on the Fleets or Clusters Not in Fleet tab, and click Cluster Upgrade in the lower right corner.
  2. Use a node that can connect to the cluster as the executor. Run the following command to download the cluster management tool of the new version:

    curl https://ucs-onprem.obs.XXXX.huawei.com/toolkits/ucs-ctl/ucs-ctl -o ucs-ctl && chmod +x ucs-ctl

  3. Upgrade the master nodes. You can run the -y command to answer yes for all questions. For details about other configurable flags, see Commands for Upgrading Master Nodes and Components.

    ./ucs-ctl upgrade cluster [cluster name]

    The cluster name must be the same as that specified when the on-premises cluster is created. If you are not sure about the cluster name, run the following command to view the cluster name:

    ./ucs-ctl get cluster

  4. Upgrade the worker nodes in either of the following methods:

    • Upgrade all worker nodes in the cluster by running the following command:
      ./ucs-ctl upgrade node -a -c [cluster name]
    • Upgrade the worker nodes in batches to prevent service interruption during the upgrade. In this case, you need to manually select the worker nodes.
      ./ucs-ctl upgrade node -n [node ip] -c [cluster name]

    If there are only master nodes in an on-premises cluster, only the upgrade command of the master nodes is required.

    For details about other configurable flags, see Commands for Upgrading Worker Nodes.

Commands for Upgrading Master Nodes and Components

You can use ucs-ctl of the latest version to upgrade your on-premises cluster. To upgrade the master nodes and components, run commands in the following format:

./ucs-ctl upgrade cluster [cluster_name] [flags]

The following flags can be configured:

  • -a: upgrades all master and worker nodes. By default, only the master nodes and components are upgraded.
  • -y: answers yes for all questions.
  • -patch: upgrades only the patch packages.
  • -R: rolls back the upgrade.

Commands for Upgrading Worker Nodes

To upgrade worker nodes, run commands in the following format:
./ucs-ctl upgrade node [flags] -c [cluster_name]

The cluster name must be specified, so the -c [cluster_name] flag must be added.

The following flags can be configured:

  • -a: upgrades all worker nodes.
  • -y: answers yes for all questions.
  • -c: specifies the cluster name.
  • -R: rolls back the upgrade.
  • -n: specifies the node IP addresses.
  • -f: specifies the node configuration file.