Upgrade Policies and Maintenance Windows for CCE Clusters in a Fleet
UCS allows you to manage multiple CCE clusters in a unified container fleet. This document describes how to orchestrate cluster upgrade policies and properly set maintenance windows for a fleet based on the automatic patch upgrade and maintenance window approaches of a single CCE cluster, to ensure service continuity during upgrades.
Solution Overview
After multiple CCE clusters form a fleet through UCS, cluster upgrades are no longer a single-cluster O&M operation but a fleet-level orchestration issue. The following items need to be planned in a unified manner:
- Upgrade sequence of each cluster
- Impact isolation and rollback policies in case of upgrade exceptions
- Service traffic assurance during upgrades
- Time orchestration of maintenance windows
The core principles of this solution are as follows: layered verification, gradual promotion, staggered windows, and backup first.
Prerequisites
- CCE clusters in a fleet are of v1.19 or later and support in-place upgrades.
- Maintenance windows have been configured for clusters on the CCE console.
- Automatic patch upgrades have been enabled for clusters.
- The region where each cluster is located supports EVS snapshot backup.
Upgrade Types
A CCE cluster version consists of a major Kubernetes version (for example, v1.31) and a CCE patch version, which correspond to two upgrade types. Different policies should be adopted for the two types in the fleet scenario.
| Upgrade Type | Feature | Fleet Policy |
|---|---|---|
| Patch version upgrade | The risk is low. You can directly upgrade from any earlier patch version to the latest version. It is recommended that the upgrade be performed once a quarter. | Enable automatic patch upgrade and control the execution time through a maintenance window. |
| Kubernetes major version upgrade | API changes, function deprecations, and add-on compatibility are involved. | Manual review and promotion layer by layer |
Before upgrading the Kubernetes major version, CCE requires that the patch version be updated to the latest version.
Fleet Upgrade Policies: Layered Verification and Gradual Promotion
Fleet-level upgrades use a layered promotion approach. Clusters in a fleet are divided into multiple layers based on their roles and are upgraded in sequence. The next layer can be promoted only after the previous layer passes the verification.
Cluster Layering
Based on the importance of services carried by clusters, clusters in a fleet are classified into the following layers:
| Layer | Cluster Role | Description |
|---|---|---|
| Layer 1 | Test clusters | Select one or two non-critical service clusters or test clusters and upgrade them first to verify the security. |
| Layer 2 | Pre-production clusters | Upgrade clusters that run workloads similar to those in the production environment to verify the impact on actual services. |
| Layer 3 | Production clusters (in batches) | Upgrade clusters by service priority or region in batches. Keep an observation interval between each batch. |
Promotion Process
The relationships between different layers are as follows:
Layer 1: Upgrade test clusters.
│
├── Stable running for 24 to 48 hours ──→ Verification passed
│
Layer 2: Upgrade pre-production clusters.
│
├── Stable running for 24 hours ──→ Verification passed
│
Layer 3 - Batch 1: Upgrade production clusters (Region A).
│
├── Stable running ──→ Verification passed
│
Layer 3 - Batch 2: Upgrade production clusters (Region B). After the upgrade of clusters at each layer is complete, a clear Go/No-Go decision gate must be set. The upgrade of the next layer can be performed only after all clusters at the current layer pass the service verification and run stably for the specified observation period.
If a fleet contains clusters in multiple regions, you are advised to upgrade the clusters by region. If an upgrade in a region fails, clusters in other regions can continue to carry services through UCS traffic scheduling.
Maintenance Window Settings
CCE's automatic patch upgrade generates an upgrade plan based on configured cluster maintenance windows and automatically completes upgrades within windows. In a fleet scenario, proper maintenance window settings are key to implementing upgrade policies.
Window Period Selection
Maintenance windows should be set during off-peak hours. During the upgrade, the API server will be temporarily interrupted, and the nodes being upgraded will be marked as unschedulable.
- For services with low traffic on workdays, you are advised to set windows to 02:00–06:00 on weekends.
- For global services, set the windows separately based on the off-peak hours of each region.
Window Duration Planning
Sufficient time must be reserved in maintenance windows to complete upgrades. Upgrading master nodes usually takes only a few minutes, but the time required for upgrading worker nodes is proportional to the cluster scale.
If an upgrade is not completed within a maintenance window, CCE suspends the upgrade and continues it in the next maintenance window. You are not advised to set the window too short. Frequent interruptions and recoveries increase O&M complexity and fault risks.
Staggered Maintenance Windows in a Fleet
Maintenance windows of clusters in the same fleet should not overlap. If all clusters enter an upgrade window at the same time and an issue is introduced during the upgrade, no healthy cluster will be available to take over service traffic.
The recommended staggering scheme is as follows:
| Cluster Role | Maintenance Window (Example) | Purpose |
|---|---|---|
| Test clusters | Wednesday 02:00 to 06:00 | Upgrade first and reserve time for troubleshooting on working days. |
| Pre-production clusters | Friday 02:00 to 06:00 | Proceed after the test cluster verification is successful. |
| Production clusters - batch 1 | Saturday 02:00 to 06:00 | First batch of production clusters |
| Production cluster - batch 2 | Next Saturday 02:00 to 06:00 | Batch 2: production clusters, with an interval of one week. |
The windows above are only examples. Adjust them based on the actual off-peak hours of your business. The core principle is to leave sufficient observation intervals between adjacent layers.
Exclusion Window Settings
All automatic upgrade plans must be suspended during the following periods, and major version upgrades must be strictly prohibited:
- Business promotion period (for example, one week before and after the Double 11 and 618 shopping day)
- Financial settlement period (end of a month, quarter, or year)
- 48 hours before and after the rollout of a major version
- Public holidays
Node Upgrade Parameter Configurations
CCE provides multiple configuration parameters for node upgrades. In a fleet scenario, you are advised to specify differentiated configurations based on cluster roles.
| Configuration Item | Test Cluster | Production Cluster |
|---|---|---|
| Max. Nodes for Batch Upgrade | Smaller value (for example, 10) | Increase the value (for example, from 40 to 60). |
| Scope of Node Upgrade Batches | Node pool level (for easier fault locating) | Cluster level (global, orderly, and controllable) |
| Node Priority | Enabled. Nodes with light loads are upgraded first. | Configured based on service requirements |
Backup Requirements
Before the upgrade, you need to trigger EVS snapshot backup on the console in one-click mode, regardless of the cluster role.
| Backup Method | Backup Time | Recovery Time | Description |
|---|---|---|---|
| etcd data backup | 1 to 5 minutes | About 2 hours | This operation is automatically performed during the upgrade. No manual operation is required. |
| EVS snapshot backup | 1 to 5 minutes | About 20 minutes | You need to manually trigger the function on the console. This method is recommended. |
Upgrade Verification
CCE provides pre-upgrade check and post-upgrade verification for a single cluster. For a fleet, you are advised to add the following verification steps.
Pre-upgrade Fleet Health Check
- Use Container Intelligent Analysis of UCS to check the health status of each cluster in a fleet.
- Ensure that no cluster is abnormal and no high-risk operation is in progress (for example, changing cluster specifications or modifying the configurations of listeners managed by CCE on the ELB console).
- Ensure that the cluster configuration has not been modified in the configuration center within the last 10 minutes. Otherwise, the upgrade may fail due to operation conflicts.
Post-upgrade Service Verification
In addition to the cluster status check and node status check automatically performed by CCE, you also need to manually check:
- Whether new nodes are properly added to the cluster.
- Whether new pods can be properly scheduled.
- Whether cross-cluster traffic distribution is working properly.
- Whether the resource distribution status at the Karmada federation layer is consistent.
Inter-layer Verification for Decision Promotion
After the upgrade of clusters at each layer is complete, the following conditions must be met before proceeding to the next layer:
- All clusters at the current layer have passed the preceding service verification.
- The stable running time reaches the specified observation period (24 to 48 hours for test clusters and 24 hours for pre-production clusters).
- No service exception alarm is reported.
Fleet Orchestration for Major Version Upgrades
Patch version upgrades can be automated. Major version upgrades need to be manually orchestrated. The recommended process is as follows:
- Unified planning: Determine the target version, read the CCE cluster version release notes, and identify API changes and deprecated features. Check whether the APIs deprecated in the target version are used in all clusters of a fleet. For details about deprecated APIs, see Before You Start.
- Patch alignment: Use automatic patch upgrade and maintenance windows to upgrade all clusters to the latest patch version of the current major version.
- Test verification: Perform major version upgrades on test clusters and observe the clusters for 48 to 72 hours. Pay attention to the following items:
- API compatibility
- Add-on running status (If an add-on is not compatible with both the source and target versions, it may be temporarily unavailable during the upgrade.)
- Custom controller and operator behaviors
- Level-by-level promotion: Promote the process in the following sequence: test > pre-production > production batching. Keep the observation period of each batch for at least one week.
- (Optional) Certificate updates: If CCE cluster certificates are about to expire, you can update them (valid for five years) during the upgrades.
If you have enabled OIDC Provider for CCE clusters and have obtained cluster signature public keys, you need to obtain the public keys again after the upgrades. Otherwise, OIDC identity authentication will become invalid.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot