Before the upgrade, you can check whether your cluster can be upgraded and which versions are available on the CCE console. For details, see Upgrade Overview.
Before upgrading a cluster, pay attention to the following points:
During a cluster upgrade, pay attention to the following points that may affect your services:
Upgrade Path |
Version Difference |
Self-Check |
---|---|---|
v1.23 or v1.25 Upgraded to v1.27 |
Docker is no longer recommended. Use containerd instead. For details, see Container Engine. |
This item has been included in the pre-upgrade check. |
v1.23 to v1.25 |
Since Kubernetes v1.25, PodSecurityPolicy has been replaced by pod Security Admission. For details, see Configuring Pod Security Admission. |
|
v1.19 to v1.21 |
The bug of exec probe timeouts is fixed in Kubernetes 1.21. Before this bug is fixed, the exec probe does not consider the timeoutSeconds field. Instead, the probe will run indefinitely, even beyond its configured deadline. It will stop until the result is returned. If this field is not specified, the default value 1 is used. This field takes effect after the upgrade. If the probe runs over 1 second, the application health check may fail and the application may restart frequently. |
Before the upgrade, check whether the timeout is properly set for the exec probe. |
kube-apiserver of CCE 1.19 or later requires that the Subject Alternative Names (SANs) field be configured for the certificate of your webhook server. Otherwise, kube-apiserver fails to call the webhook server after the upgrade, and containers cannot be started properly. Root cause: X.509 CommonName is discarded in Go 1.15. kube-apiserver of CCE 1.19 is compiled using Go 1.15. If your webhook certificate does not have SANs, kube-apiserver does not process the CommonName field of the X.509 certificate as the host name by default. As a result, the authentication fails. |
Before the upgrade, check whether the SAN field is configured in the certificate of your webhook server.
|
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 |
With the evolution of Kubernetes APIs, APIs are periodically reorganized or upgraded, and old APIs are deprecated and finally deleted. The following tables list the deprecated APIs in each Kubernetes community version. For details about more deprecated APIs, see Deprecated API Migration Guide.
When an API is deprecated, the existing resources are not affected. However, when you create or edit the resources, the API version will be intercepted.
Resource Name |
Deprecated API Version |
Substitute API Version |
Change Description |
---|---|---|---|
CSIStorageCapacity |
storage.k8s.io/v1beta1 |
storage.k8s.io/v1 (This API is available since v1.24.) |
None |
FlowSchema and PriorityLevelConfiguration |
flowcontrol.apiserver.k8s.io/v1beta1 |
flowcontrol.apiserver.k8s.io/v1beta3 (This API is available since v1.26.) |
None |
HorizontalPodAutoscaler |
autoscaling/v2beta2 |
autoscaling/v2 (This API is available since v1.23.) |
None |
Resource Name |
Deprecated API Version |
Substitute API Version |
Change Description |
---|---|---|---|
CronJob |
batch/v1beta1 |
batch/v1 (This API is available since v1.21.) |
None |
EndpointSlice |
discovery.k8s.io/v1beta1 |
discovery.k8s.io/v1 (This API is available since v1.21.) |
Pay attention to the following changes:
|
Event |
events.k8s.io/v1beta1 |
events.k8s.io/v1 (This API is available since v1.19.) |
Pay attention to the following changes:
|
HorizontalPodAutoscaler |
autoscaling/v2beta1 |
autoscaling/v2 (This API is available since v1.23.) |
None |
PodDisruptionBudget |
policy/v1beta1 |
policy/v1 (This API is available since v1.21.) |
If spec.selector is set to null ({}) in PodDisruptionBudget of policy/v1, all pods in the namespace are selected. (In policy/v1beta1, an empty spec.selector means that no pod will be selected.) If spec.selector is not specified, pod will be selected in neither API version. |
PodSecurityPolicy |
policy/v1beta1 |
None |
Since v1.25, the PodSecurityPolicy resource no longer provides APIs of the policy/v1beta1 version, and the PodSecurityPolicy access controller is deleted. Use Pod Security Admission instead. |
RuntimeClass |
node.k8s.io/v1beta1 |
node.k8s.io/v1 (This API is available since v1.20.) |
None |
Resource Name |
Deprecated API Version |
Substitute API Version |
Change Description |
---|---|---|---|
MutatingWebhookConfiguration ValidatingWebhookConfiguration |
admissionregistration.k8s.io/v1beta1 |
admissionregistration.k8s.io/v1 (This API is available since v1.16.) |
|
CustomResourceDefinition |
apiextensions.k8s.io/v1beta1 |
apiextensions/v1 (This API is available since v1.16.) |
|
APIService |
apiregistration/v1beta1 |
apiregistration.k8s.io/v1 (This API is available since v1.10.) |
None |
TokenReview |
authentication.k8s.io/v1beta1 |
authentication.k8s.io/v1 (This API is available since v1.6.) |
None |
LocalSubjectAccessReview SelfSubjectAccessReview SubjectAccessReview SelfSubjectRulesReview |
authorization.k8s.io/v1beta1 |
authorization.k8s.io/v1 (This API is available since v1.16.) |
spec.group was renamed spec.groups in v1 (patch #32709). |
CertificateSigningRequest |
certificates.k8s.io/v1beta1 |
certificates.k8s.io/v1 (This API is available since v1.19.) |
Pay attention to the following changes in certificates.k8s.io/v1:
|
Lease |
coordination.k8s.io/v1beta1 |
coordination.k8s.io/v1 (This API is available since v1.14.) |
None |
Ingress |
networking.k8s.io/v1beta1 extensions/v1beta1 |
networking.k8s.io/v1 (This API is available since v1.19.) |
|
IngressClass |
networking.k8s.io/v1beta1 |
networking.k8s.io/v1 (This API is available since v1.19.) |
None |
ClusterRole ClusterRoleBinding Role RoleBinding |
rbac.authorization.k8s.io/v1beta1 |
rbac.authorization.k8s.io/v1 (This API is available since v1.8.) |
None |
PriorityClass |
scheduling.k8s.io/v1beta1 |
scheduling.k8s.io/v1 (This API is available since v1.14.) |
None |
CSIDriver CSINode StorageClass VolumeAttachment |
storage.k8s.io/v1beta1 |
storage.k8s.io/v1 |
|
Resource Name |
Deprecated API Version |
Substitute API Version |
Change Description |
---|---|---|---|
NetworkPolicy |
extensions/v1beta1 |
networking.k8s.io/v1 (This API is available since v1.8.) |
None |
DaemonSet |
extensions/v1beta1 apps/v1beta2 |
apps/v1 (This API is available since v1.9.) |
|
Deployment |
extensions/v1beta1 apps/v1beta1 apps/v1beta2 |
apps/v1 (This API is available since v1.9.) |
|
StatefulSet |
apps/v1beta1 apps/v1beta2 |
apps/v1 (This API is available since v1.9.) |
|
ReplicaSet |
extensions/v1beta1 apps/v1beta1 apps/v1beta2 |
apps/v1 (This API is available since v1.9.) |
spec.selector is now a mandatory field and cannot be changed after the object is created. The label of an existing template can be used as a selector for seamless migration. |
PodSecurityPolicy |
extensions/v1beta1 |
policy/v1beta1 (This API is available since v1.10.) |
PodSecurityPolicy for the policy/v1beta1 API version will be removed in v1.25. |
How to back up a node:
Backup Type |
Backup Object |
Backup Mode |
Backup Time |
Rollback Time |
Description |
---|---|---|---|---|---|
etcd data backup |
etcd data |
Automatic backup during an upgrade |
1-5min |
2h |
Mandatory. The backup is automatically performed during the upgrade. |
CBR cloud server backup |
Master node disks, including component images, configurations, logs, and etcd data |
One-click backup on web pages (manually triggered) |
20 minutes to 2 hours (based on the cloud backup tasks in the current region) |
20min |
This function is gradually replaced by EVS snapshot backup. |