Kubernetes 1.31 release notes

更新时间:
复制 MD 格式

Alibaba Cloud Container Compute Service (ACS) is fully conformant with the upstream Kubernetes community. This topic describes the major changes in Kubernetes 1.31, including upgrade notes, behavior changes, new features, deprecated features and APIs, and feature gates.

Component versions

The following table lists the versions of core components in an ACS cluster.

Core component

Version

Kubernetes

1.31.1-aliyun.1

etcd

v3.5.4

containerd

1.6.22

CoreDNS

v1.11.3.2-f57ea7ed6-aliyun

CSI

Upgraded to the latest supported version. For more information, see the component changelog for csi-provisioner.

New features

  • When you specify the caBundle field in a CustomResourceDefinition (CRD), if the caBundle is non-empty but its content is invalid or does not contain any CA certificates, the CRD will not be served. After the CRD's caBundle is set to a valid state, you can no longer update it to an invalid or empty state to prevent service disruption for the CRD.

  • The MatchLabelKeysInPodAffinity feature gate is promoted to Beta and is enabled by default. By default, podAffinity and podAntiAffinity now support the more fine-grained configuration fields matchLabelKeys and mismatchLabelKeys. These fields solve an issue where the scheduler cannot distinguish between old and new pods during a rolling update of a Deployment, which can cause scheduling results to not meet the expected affinity and anti-affinity rules.

  • The JobSuccessPolicy feature gate is promoted to Beta and is enabled by default. This allows you to configure a success policy for Indexed Jobs. For more information, see Job Success Policy.

  • The DisableNodeKubeProxyVersion feature gate is promoted to Beta and is enabled by default. The kube-proxy version is no longer displayed in the status.nodeInfo.kubeProxyVersion field of a node. The value previously displayed in this field was inaccurate and did not reflect the actual kube-proxy version.

  • The ServiceAccountTokenNodeBinding feature gate is promoted to Beta and is enabled by default. It allows you to create a ServiceAccount token that is directly bound to a node. The token becomes invalid when it expires or when the associated node or ServiceAccount is deleted.

  • The RecursiveReadOnlyMounts feature gate is promoted to Beta and is enabled by default. This allows you to set a recursive read-only attribute on a pod's volume mount. A volume mounted this way, along with all its subdirectories and files, is set to read-only. For more information, see Recursive read-only mounts.

  • When a pod spec changes but the image field is not modified, the kubelet no longer restarts the container. This avoids unnecessary pod restarts caused by non-functional configuration updates.

  • The HonorPVReclaimPolicy feature gate is promoted to Beta and is enabled by default. It adds a finalizer to a PersistentVolume (PV), ensuring that when the reclaim policy is Delete, the PV object is removed only after its underlying storage is deleted. For more information, see PersistentVolume deletion protection finalizer.

  • kubectl debug now supports custom templates (profiles) for debugging pods. For more information, see Kubernetes 1.31: Custom Profiling in Kubectl Debug Graduates to Beta.

  • The streaming protocol used by Kubernetes clients, such as kubectl, for the kubectl cp, kubectl attach, kubectl exec, and kubectl port-forward commands has been updated to a more modern and flexible WebSocket streaming protocol.

  • The API server can now perform consistent reads from its cache, which reduces requests to etcd and improves List request performance. For more information, see Consistent Reads from Cache.

Behavior change

  • The built-in CephFS volume plug-in (kubernetes.io/cephfs) is removed and replaced by the CephFS CSI driver.

    If you are using the CephFS volume plug-in, you must switch to the new solution and redeploy your applications with the new driver before you upgrade your cluster to version 1.31.

  • The built-in CephRBD volume plug-in (kubernetes.io/rbd) is removed and replaced by the RBD CSI driver.

    If you are using the CephRBD volume plug-in, you must switch to the new solution and redeploy your applications with the new driver before you upgrade your cluster to version 1.31.

  • The CSIMigrationPortworx feature gate is enabled by default. It migrates volume operations from the legacy Portworx in-tree plug-in to the Portworx CSI plug-in. If you use Portworx as your storage solution, you must install and configure the Portworx CSI plug-in in your cluster before you upgrade to version 1.31.

References

For the complete changelog for Kubernetes 1.31, see CHANGELOG-1.31 and Kubernetes v1.31: Elli.