Kubernetes 1.21 Power to the Community

The release of Kubernetes 1.21 represents a pivotal moment in the evolution of container orchestration, specifically designed to empower the community through a massive influx of enhancements and architectural refinements. This version is characterized by a strategic shift toward providing more granular control over infrastructure, particularly for high-performance workloads and complex network environments. By integrating a substantial number of enhancements—ranging from the graduation of beta features to stable status to the introduction of novel alpha-level capabilities—Kubernetes 1.21 addresses the growing pains of large-scale cluster management. The release is a testament to the global effort of the development team, with contributors spanning timezones from UTC+8 to UTC-8, ensuring that the platform evolves to meet the needs of a diverse, international user base. The focus of this release is not merely incremental; it is about opening doors for scientific researchers, database administrators, and DevOps engineers who require extreme hardware demands and precise resource allocation.

Enhancement Statistics and Release Composition

Kubernetes 1.21 is defined by a high volume of changes that refine the stability and functionality of the platform. Depending on the reporting metric, this release includes between 50 and 51 total enhancements, showing a clear upward trend in development velocity compared to previous versions. Specifically, Kubernetes 1.20 featured 43 enhancements, and Kubernetes 1.19 featured 34, indicating that the project is accelerating its delivery of new capabilities.

The breakdown of these enhancements is as follows:

  • 13 to 15 enhancements have graduated from beta to stable.
  • 16 enhancements have graduated from alpha to beta.
  • 19 to 20 enhancements have introduced new alpha-level features.
  • 2 features have been officially deprecated.

The graduation of features to stable status means that these components have undergone rigorous testing and are now considered production-ready, providing a reliable foundation for enterprise deployments. The transition of alpha features to beta indicates that the community has provided feedback and the features are now viable for testing in non-critical environments. The introduction of numerous alpha features reflects the experimental nature of the project, allowing for the exploration of high-impact ideas such as better memory management and flexible load balancing before they are refined for wider use.

Infrastructure and Node Management

Kubernetes 1.21 introduces several critical updates to how nodes are managed, shut down, and optimized for high-performance computing. These changes are particularly impactful for users running stateful applications or those with extreme hardware requirements.

Graceful Node Shutdown

The Graceful Node Shutdown feature has graduated to beta in this release. This capability allows users to implement a timer for node shutdowns, which ensures that pods can stop cleanly rather than being terminated abruptly.

  • Direct Fact: The feature allows for a timed shutdown sequence.
  • Impact Layer: This prevents data loss and corruption in stateful applications by allowing pods to complete their current tasks and shut down gracefully.
  • Contextual Layer: This works in tandem with the "herd of cattle" mentality of containers but acknowledges that some workloads require a more "pet-like" treatment during termination to ensure system integrity.

The implementation of this feature involves listening to systemd inhibitor locks on Linux systems. This allows the Kubernetes node to communicate with the underlying operating system to ensure that the shutdown process is coordinated.

Suspend and Resume Jobs

Introduced as an alpha feature, the Suspend/Resume Jobs capability allows users to pause and later restart jobs.

  • Direct Fact: Users can suspend a job and resume it at a later time.
  • Impact Layer: This allows for the preservation of state and metadata that would otherwise be lost if a job were simply terminated.
  • Contextual Layer: This is a departure from the standard container lifecycle where terminating a job removes all associated metadata. It provides a critical option for long-running batch processes or scientific computations that may need to be paused due to resource constraints or dependency requirements.

Furthermore, this feature allows jobs to be spun up and have work enacted upon them before they are made available on the cluster. This enables administrators to inject dependencies into a node before the job is officially brought online.

Pod Disruption Budget

The Pod Disruption Budget has reached stable status in Kubernetes 1.21. This feature allows users to set limits on the number of pods that can be down simultaneously.

  • Direct Fact: Users can define a minimum number of available pods or a maximum number of unavailable pods.
  • Impact Layer: This is essential for maintaining high availability during rolling cluster upgrades.
  • Contextual Layer: By ensuring a set portion of the cluster remains online, administrators can upgrade the infrastructure without triggering a complete service outage.

Memory and Hardware Optimization

For workloads with extreme hardware demands, such as large-scale databases or scientific research tools, Kubernetes 1.21 provides several enhancements to improve resource allocation and performance.

Memory Manager

The Memory Manager is highlighted as a key feature for performance-critical applications.

  • Direct Fact: A new memory manager has been implemented to handle memory allocation more effectively.
  • Impact Layer: It reduces performance hits for delicate deployments, making the migration of databases and other memory-intensive workloads to Kubernetes more attractive.
  • Contextual Layer: Memory is a vital resource; without precise management, the performance of high-demand applications can degrade, making them unsuitable for Kubernetes.

Hugepages and Downward API

Support for hugepages has graduated to beta via the downward API.

  • Direct Fact: Pods can now fetch information regarding their hugepage requests and limits through the downward API.
  • Impact Layer: This provides consistency across resource monitoring, as hugepages are now treated similarly to CPU, memory, and ephemeral-storage.
  • Contextual Layer: Hugepages are essential for high-performance applications that require large contiguous blocks of memory to reduce the overhead of page table lookups.

Networking and Connectivity

Networking in Kubernetes 1.21 has seen significant advancements, particularly in how the cluster handles IP addresses and how services are exposed to external traffic.

IPv4/IPv6 Dual Stack Support

The support for IPv4/IPv6 dual stack has graduated to beta.

  • Direct Fact: Clusters can now utilize both IPv4 and IPv6 simultaneously.
  • Impact Layer: Users are no longer forced to choose one protocol over the other, allowing for better integration with modern networking environments and broader reach.
  • Contextual Layer: This is a major step toward the modernization of the Kubernetes networking stack, ensuring compatibility with the global transition to IPv6.

LoadBalancer Service Type

A new alpha feature introduces improvements to the LoadBalancer service type.

  • Direct Fact: Administrators can now use any load balancer they prefer within their clusters.
  • Impact Layer: This removes the restriction of being bound to a single load balancer per cluster.
  • Contextual Layer: This increases flexibility for organizations using multiple cloud providers or hybrid-cloud strategies where different load-balancing solutions may be required for different workloads.

EndPointSlice Capability

The EndPointSlice capability has reached General Availability (GA) in version 1.21.

  • Direct Fact: End point lists can be sliced up into smaller, manageable chunks, such as by namespace.
  • Impact Layer: Searching for and managing endpoints is no longer an arduous task, especially in large clusters.
  • Contextual Layer: As clusters grow, storing all endpoints in a single file becomes inefficient. Slicing these endpoints reduces the load on the API server and improves the speed of endpoint discovery.

Network Policy Port Ranges

The implementation of network policy port ranges simplifies the configuration of network security.

  • Direct Fact: Users can define a network policy over a range of consecutive ports using a single rule.
  • Impact Layer: This eliminates the need to write 20 separate rules for 20 consecutive ports.
  • Contextual Layer: This reduces the complexity of configuration files and minimizes the potential for human error during the definition of network security policies.

Storage and Volume Management

Kubernetes 1.21 introduces early-stage improvements to how storage is monitored and managed within the cluster.

Volume Health

The Volume Health feature has been introduced as an alpha capability.

  • Direct Fact: This feature provides better visibility into the health of persistent volumes.
  • Impact Layer: It simplifies the troubleshooting process for issues occurring in persistent volumes, which were previously difficult to diagnose.
  • Contextual Layer: Storage reliability is critical for stateful applications; by providing a mechanism to monitor volume health, Kubernetes reduces the mean time to recovery (MTTR) for storage-related failures.

Security and Access Control

The security landscape of Kubernetes 1.21 is marked by both the introduction of new credentials and the deprecation of legacy security frameworks.

External client-go Credential Providers

External client-go credential providers have graduated to beta in 1.21.

  • Direct Fact: This allows for the integration of external providers for managing credentials used by the client-go library.
  • Impact Layer: It enables more secure and flexible authentication methods, allowing organizations to leverage their own identity providers.
  • Contextual Layer: This aligns with the broader trend of moving away from static secrets toward dynamic, provider-based authentication.

Pod Security Policy (PSP) Deprecation

One of the most significant changes in Kubernetes 1.21 is the official deprecation of Pod Security Policies.

  • Direct Fact: PSPs are deprecated in version 1.21 and are tentatively scheduled for complete removal in version 1.25 (mid-2022).
  • Impact Layer: Users must begin migrating to alternative security frameworks immediately to avoid breaking changes in future versions.
  • Contextual Layer: PSPs were a popular tool for restricting what deployments could do, such as limiting user execution or restricting access to volumes and networks. However, they suffered from serious limitations, including a dual authorization model that weakened security and an inconsistent API.

The Kubernetes team decided against a "v2" of PSPs because fixing the flaws would have required breaking changes. Instead, they are encouraging the use of alternatives like Open Policy Agent (OPA), which provides more fine-grained access control and a more flexible policy language.

Operational Utilities and Jobs

The 1.21 release focuses on cleaning up the cluster and optimizing the lifecycle of jobs.

TTL After Finish Cleanup

The TTL (Time To Live) after finish cleanup for Jobs and Pods has graduated to beta.

  • Direct Fact: This feature allows for the automatic cleanup of completed jobs and their associated pods after a specified duration.
  • Impact Layer: It prevents the cluster from becoming cluttered with "completed" pods, which can otherwise consume resources and make the API server sluggish.
  • Contextual Layer: This is a critical operational improvement for environments that run thousands of short-lived batch jobs, ensuring that the cluster remains lean and efficient.

Topology-Aware Hints

Topology-aware hints are introduced as an alpha feature in Kubernetes 1.21.

  • Direct Fact: This feature provides hints to the network to route traffic based on the topology of the nodes.
  • Impact Layer: It can reduce latency and cost by keeping traffic within the same zone or region.
  • Contextual Layer: This replaces previous attempts at topology-aware routing, with the specific context for the switch detailed in the associated Kubernetes Enhancement Proposal (KEP).

Summary of Feature Status

The following table provides a consolidated view of the feature status changes introduced in Kubernetes 1.21.

Feature Status in 1.21 Category
Pod Disruption Budget Stable Node Management
EndPointSlice GA / Stable Networking
IPv4/IPv6 Dual Stack Beta Networking
Graceful Node Shutdown Beta Node Management
TTL After Finish Cleanup Beta Jobs/Pods
External client-go Credential Providers Beta Auth/Security
Hugepages Downward API Beta Node/Hardware
Topology-Aware Hints Alpha Networking
Suspend/Resume Jobs Alpha Jobs
Volume Health Alpha Storage
LoadBalancer Service Type Alpha Networking
Pod Security Policy Deprecated Auth/Security

Analysis of Technical Impact

The technical trajectory of Kubernetes 1.21 indicates a transition from a general-purpose orchestrator to a high-precision platform. The inclusion of the Memory Manager and Hugepages support signals that Kubernetes is now targeting "heavyweight" workloads that were previously kept on bare metal or in specialized VM environments. The shift toward "Power to the Community" is evidenced by the diversity of the release team and the range of features that target specific, niche use cases—such as scientific research and high-performance database hosting.

The deprecation of Pod Security Policies is the most controversial yet necessary move in this release. It highlights the project's willingness to remove legacy components that hinder architectural progress. By moving toward a model where external policy engines like OPA handle security, Kubernetes is decoupling the "mechanism" of enforcement from the "policy" of what is allowed.

From a networking perspective, the transition to IPv6 dual-stack and the introduction of EndPointSlices demonstrate a scalability focus. As clusters scale to thousands of nodes and tens of thousands of pods, the overhead of managing endpoints and the limitations of IPv4 address space become critical bottlenecks. Kubernetes 1.21 proactively addresses these issues, ensuring that the platform can grow without hitting a wall of technical debt.

Deployment and Getting Started

Kubernetes 1.21 is available for download via GitHub. For those looking to implement these features, several pathways are available:

  • Interactive Tutorials: Available on the main Kubernetes website for beginners.
  • Local Clusters: The use of kind (Kubernetes in Docker) is recommended for local development and testing of 1.21 features.
  • Manual Installation: The "Kubernetes the Hard Way" tutorial by Kelsey Hightower is suggested for those who wish to build a cluster from scratch to understand the underlying components.

Sources

  1. Kubernetes Blog
  2. Kubermatic
  3. Sysdig
  4. Red Hat

Related Posts