Kubernetes 1.23 is the third and final release of container orchestration this year. Among other things, it stabilizes the dual-stack operation in the cluster, the horizontal pod autoscaler and generic ephemeral volumes. With the new functions, initially introduced as alpha, the server-side validation of fields and the connection to OpenAPI v3 are noteworthy.
Overall, the blog post speaks about the release of eleven stabilized and 19 new functions. 17 take the step from the alpha to the beta phase in the current version. The FlexVolume driver is now deprecated and should be replaced by the Container Storage Interface (CSI). Some klog-specific logging flags are also marked as obsolete and will soon disappear.
Kubernetes 1.23 now natively allows dual-stack operation in a cluster, which was introduced as alpha in version 1.20. This means that any pod and service can receive both IPv4 and IPv6 addresses. With the stabilization, the feature gate is no longer necessary IPv6DualStack. Even if the clusters run in dual-stack operation, the individual pods and services work with only one protocol by default.
The CNI plug-in (Container Network Interface) specifies the operating mode for pods. In order to use services with IPv4 and IPv6 in parallel, the field .spec.ipFamilyPolicy either on PreferDualStack or on RequireDualStack be set. Despite the stabilization, dual-stack operation is not mandatory, but still optional. Since it depends on various factors such as the CNI interfaces, it can according to a blog post It may well be that individual Kubernetes distributions do not offer full integration.
The generic Ephemeral Volumes are also considered stable in the current release. This allows storage drivers to create dynamic volumes for individual pods. In contrast to persistent volumes, their lifespan is linked to the associated pods and is therefore volatile or short-lived (ephemeral).
Kubernetes offers different types of volatile volumes from blank to boot emptyDir over CSI Ephemeral Volumes up to the now stabilized generic ephemeral volumes. This is an extension of emptyDir– Volumes that have a fixed size and can exist either locally or in the network. They also allow compared to emptyDir additional functions such as snapshots, cloning, resizing and tracking of storage capacity.
Autoscaler, security and more
The HorizontalPodAuocaler v2 is interesting for the other stabilized functions. It automatically scales the number of pods in a replication controller, deployment or replica set based on specified metrics or the respective CPU load.
The way from the alpha to the beta phase was taken by PodSecurity to define isolation levels for pods and structured logging.
Validations in the alpha phase
The connection to OpenAPI v3, which can be found via the Feature Gate OpenAPIV3 activate. Is that also a new feature Gate ServerSideFieldValidation enabled, the server will return warnings if Kubernetes objects contain unknown or duplicate fields.
The validation of Custom Resource Definitions (CRD) with the Common Expression Language (CEL) is also new and marked as Alpha.