Before the upgrade, you can check whether your cluster can be upgraded and which versions are available on the CCE console. For details, see Overview.
In kubelet 1.16 and later versions, QoS classes are different from those in earlier versions. In kubelet 1.15 and earlier versions, only containers in spec.containers are counted. In kubelet 1.16 and later versions, containers in both spec.containers and spec.initContainers are counted. The QoS class of a pod will change after the upgrade. As a result, the container in the pod restarts. You are advised to modify the QoS class of the service container before the upgrade to avoid this problem. For details, see Table 1.
Init Container (Calculated Based on spec.initContainers) |
Service Container (Calculated Based on spec.containers) |
Pod (Calculated Based on spec.containers and spec.initContainers) |
Impacted or Not |
---|---|---|---|
Guaranteed |
Besteffort |
Burstable |
Yes |
Guaranteed |
Burstable |
Burstable |
No |
Guaranteed |
Guaranteed |
Guaranteed |
No |
Besteffort |
Besteffort |
Besteffort |
No |
Besteffort |
Burstable |
Burstable |
No |
Besteffort |
Guaranteed |
Burstable |
Yes |
Burstable |
Besteffort |
Burstable |
Yes |
Burstable |
Burstable |
Burstable |
No |
Burstable |
Guaranteed |
Burstable |
Yes |
Before upgrading a cluster, check the health status of the cluster and nodes and ensure that they are available.
Method 1: Use the console.
On the CCE console, click Resource Management in the navigation pane, and click Clusters and Nodes separately to check whether the cluster and nodes are normal.
Method 2: Run kubectl commands.
kubectl get cs
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"}
In the command output, the value of STATUS must be Healthy for all items.
All nodes must be in the Ready state.
NAME STATUS ROLES AGE VERSION xxx.xxx.xx.xx Ready <none> 38d v1.9.7-r1 xxx.xxx.xx.xx Ready <none> 38d v1.9.7-r1 xxx.xxx.xx.xx Ready <none> 38d v1.9.7-r1
Before upgrading a cluster, follow the pre-upgrade checklist to identify risks and problems in advance.
Module |
Item |
---|---|
Cluster |
Check whether the node IP addresses (including EIPs) of the current cluster are used in other configurations or whitelists. |
Perform the pre-upgrade check. |
|
Workload |
Record the number and status of workloads for comparison after the upgrade. |
For the databases you use (such as Direct Connect, Redis, and MongoDB), you need to consider the changes in their whitelists, routes, or security group policies in advance. |
|
Storage |
Record the storage status to check whether storage resources are lost after the upgrade. |
Networking |
Check and back up the load balancing services and ingresses. |
If Direct Connect is used, check whether the upgrade causes changes in the IP addresses of nodes or pods where services are deployed. To handle changes, you need to enable routes on Direct Connect in advance. |
|
Add-on |
When Kubernetes 1.9 is upgraded to 1.11, the kube-dns of the cluster is uninstalled and replaced with CoreDNS. Back up the DNS address configured in kube-dns so that you can use it in CoreDNS when the domain name resolution is abnormal. |
O&M |
Private configurations: Check whether data plane passwords, certificates, and environment variables are configured for nodes or containers in the cluster before the upgrade. If a container is restarted (for example, the node is abnormal and the pod is re-scheduled), the configurations will be lost and your service will be abnormal. |
Check and back up kernel parameters or system configurations. |
Currently, there are two backup modes for cluster upgrade: