You can upgrade the Kubernetes version of your cluster in the Container Service console.

View the Kubernetes version of your cluster in the Kubernetes cluster list.


Instructions

  • To upgrade the cluster, make sure your machine can access the Internet to download the necessary software packages.
  • The upgrade may fail. We recommend that you back up snapshots before upgrading the cluster to guarantee your data security. For how to create a snapshot, see Create snapshots.
  • During the upgrade, your applications are not affected, but we recommend that you do not manage the cluster by using kubectl or the Container Service console. The upgrade lasts 5–15 minutes. The cluster status changes to Running after the upgrade.

Prerequisites

Check the health status of the cluster before upgrading the cluster. Make sure the cluster is healthy.

Log on to the master node. For more information, see Access Kubernetes clusters by using SSH and Connect to a Kubernetes cluster by using kubectl.

  1. Run the command kubectl get cs. Make sure all the modules are healthy.
    NAME STATUS MESSAGE ERROR
     scheduler Healthy ok
     controller-manager Healthy ok
     etcd-0 Healthy {"health": "true"}
     etcd-1 Healthy {"health": "true"}
     etcd-2 Healthy {"health": "true"}
  2. Run the command kubectl get nodes. Make sure all the nodes are in the Ready status.
    kubectl get nodes
     NAME STATUS ROLES AGE VERSION
     cn-shanghai.i-xxxxxx Ready master 38d v1.9.3
     cn-shanghai.i-xxxxxx Ready <none> 38d v1.9.3
     cn-shanghai.i-xxxxxx Ready <none> 38d v1.9.3
     cn-shanghai.i-xxxxxx Ready <none> 38d v1.9.3
     cn-shanghai.i-xxxxxx Ready master 38d v1.9.3
     cn-shanghai.i-xxxxxx Ready master 38d v1.9.3

If nodes are abnormal, you can fix them by yourself or open a ticket to ask Alibaba Cloud engineers to fix them.

Procedure

  1. Log on to the Container Service console.
  2. Under Kubernetes, click Clusters in the left-side navigation pane.
  3. ClickMore > Upgrade Cluster at the right of the cluster.


  4. Click Upgrade in the displayed dialog box.

    The system starts to upgrade the Kubernetes version.

After the upgrade, you can check the Kubernetes version of this cluster in the Kubernetes cluster list to make sure whether or not the upgrade is successful.