When you upgrade a cluster, the system automatically checks the compatibility between the ECI Platform Version and the Kubernetes version. For ECI-based pods whose ECI Platform Version is incompatible with the target Kubernetes version, manually delete and recreate the pods before you upgrade the cluster. Before an upgrade, make sure the ECI Platform Version is compatible with the target Kubernetes version.
What is the ECI platform version
The ECI platform version identifies the runtime environment for ECI-based pods. New versions bring features, bug fixes, and patches.
Pods in ACK Serverless clusters include the k8s.aliyun.com/eci-platform-version annotation by default, indicating the ECI platform version:
apiVersion: v1
kind: Pod
metadata:
annotations:
k8s.aliyun.com/eci-platform-version: 1.0.0
name: demo-76d8d9f9d8-l7pwm
namespace: default
...
New ECI pods use platform version 1.1.0. Existing pods use 1.0.0 or have no annotation (unavailable).
Compatibility matrix
| ECI platform version | Compatible Kubernetes versions |
|---|---|
| 1.1.0 | 1.12 and later |
| 1.0.0 | 1.12, 1.14, 1.16, 1.18, 1.20, 1.22, and 1.24 |
Unavailable (k8s.aliyun.com/eci-platform-version annotation not configured) |
1.12, 1.14, 1.16, 1.18, 1.20, 1.22, and 1.24 |
For Kubernetes 1.26 or later, pods with version 1.0.0 or no annotation are incompatible and must be upgraded first.
Upgrade the ECI platform version
Prerequisites
Before you begin, make sure you have:
-
kubectl is installed and configured. See Connect to the cluster with kubectl.
Identify pods that need upgrading
List all ECI-based pods with version 1.0.0 or no annotation. The output shows namespace, pod name, ECI platform version, and ECI instance ID, comma-separated.
kubectl get pods -A -o json | jq -r '.items[] | select(.metadata.annotations["k8s.aliyun.com/eci-platform-version"] == "1.0.0" or .metadata.annotations["k8s.aliyun.com/eci-platform-version"] == null or .metadata.annotations["k8s.aliyun.com/eci-platform-version"] == "") | select(.spec.nodeName | startswith("virtual-kubelet")) | "\(.metadata.namespace),\(.metadata.name),\(.metadata.annotations["k8s.aliyun.com/eci-platform-version"] // ""),\(.metadata.annotations["k8s.aliyun.com/eci-instance-id"])"'
Example output:
default,portal-server-57dfc4fdc8-2gl64,,eci-2zecdr8z5jy******
Delete and recreate affected pods
Delete each pod from the previous step. Kubernetes automatically recreates it with the latest ECI platform version (1.1.0).
kubectl delete pod portal-server-57dfc4fdc8-2gl64 -n default
Expected output:
pod "portal-server-57dfc4fdc8-2gl64" deleted
Verify the upgrade
Confirm all ECI-based pods are on version 1.1.0:
kubectl get pods -A -o json | jq -r '.items[] | select(.spec.nodeName | startswith("virtual-kubelet")) | "\(.metadata.namespace),\(.metadata.name),\(.metadata.annotations["k8s.aliyun.com/eci-platform-version"] // ""),\(.metadata.annotations["k8s.aliyun.com/eci-instance-id"] // "")"'
All entries should show 1.1.0 in the third field. Once confirmed, proceed with the cluster upgrade.