The All-or-Nothing Upgrade Problem in Standard Kubernetes

Traditionally, upgrading a Kubernetes control plane's minor version, like moving from 1.33 to 1.34, has been a high-stakes operation. In standard Kubernetes deployments, the upgrade process immediately commits changes to storage schemas. This means that if an issue arises after the API server is upgraded, rolling back to the previous minor version without restoring from an etcd snapshot is impossible. This inherent risk has made minor version upgrades a point of operational friction for many teams.

This all-or-nothing approach meant that a single regression could necessitate a complex and potentially data-impacting restore operation. For production environments, this often translated to delaying upgrades, increasing the risk of falling behind on security patches and new features. The operational burden was significant, requiring careful planning and often extensive downtime to mitigate potential rollback failures.

GKE's Two-Step Upgrade Solution: KEP-4330

To address this critical operational gap, the Google Kubernetes Engine (GKE) team spearheaded upstream contributions to Kubernetes, specifically driving the adoption of Kubernetes Enhancement Proposal KEP-4330 (Compatibility Versions). This proposal fundamentally changes how minor version upgrades are handled by introducing a phased approach.

GKE has now implemented this KEP, offering what they call two-step control plane upgrades. This feature, validated through public preview with enterprise customers, significantly reduces the risk associated with minor version upgrades. Instead of an immediate, irreversible schema change, the upgrade is split into two distinct phases.

Diagram illustrating the two distinct phases of GKE's control plane upgrade process.

How the Two-Step Upgrade Works Under the Hood

The core innovation lies in decoupling the control plane's API server version from the storage schema version. In a standard Kubernetes upgrade, these are tightly coupled. When you upgrade the API server to a new minor version, it immediately attempts to update the etcd schema to match. If this schema update fails or if a regression is found post-upgrade, you're stuck.

GKE's two-step upgrade works as follows:

Phase 1: API Server Upgrade

In the first phase, GKE upgrades only the API server to the new minor version. Crucially, during this phase, the API server is configured to be backward-compatible with the existing etcd storage schema. This means the API server can read and write data to etcd using the older schema. If any issues arise with the new API server version, GKE can immediately roll back the API server to the previous minor version without impacting the etcd schema. This rollback is fast and safe, as no schema changes have been committed.

Phase 2: Storage Schema Upgrade

Once the new API server version has been validated and is stable (typically after a set period or manual confirmation), the second phase can be initiated. In this phase, GKE upgrades the etcd storage schema to align with the new minor version. This schema upgrade is also a critical operation, but because the API server has already been running successfully on the new version and is compatible with the older schema, the risk is greatly reduced. If this phase encounters issues, it can also be rolled back, though the implications are more significant than rolling back just the API server.

This staged approach provides a critical safety net. It allows operators to test the new control plane version in a live environment with their workloads before committing to irreversible storage schema changes. Think of it less like a single, high-stakes surgery and more like a carefully managed two-stage medical procedure: first, stabilize the patient with a new treatment, then perform necessary internal adjustments.

Benefits for GKE Users

The introduction of two-step control plane upgrades brings several key benefits to GKE users:

  • Reduced Operational Risk: The primary benefit is the elimination of the all-or-nothing risk. Operators can now perform minor version upgrades with a much higher degree of confidence.
  • Faster Rollbacks: In the event of an issue during Phase 1, rolling back the API server is significantly faster and less complex than a full etcd restore.
  • Improved Stability: By enabling safer upgrades, GKE encourages users to stay current with minor versions, benefiting from the latest features and, critically, security patches.
  • Enterprise-Grade Operations: This feature brings enterprise-grade resilience to Kubernetes control plane management, a crucial aspect for large-scale deployments.

The Path Forward: Broader Kubernetes Adoption

GKE's implementation of KEP-4330 is a significant step forward for Kubernetes cluster management. The proposal itself, driven by Google's experience with managed Kubernetes services, aims to make this safer upgrade path a reality for the broader Kubernetes ecosystem. As more managed Kubernetes providers and on-premises distributions adopt similar mechanisms, the operational overhead and risk associated with maintaining up-to-date Kubernetes clusters will continue to decrease.

What remains to be seen is how quickly other Kubernetes distributions will integrate similar phased upgrade strategies. The success and validation of GKE's approach should provide strong impetus for wider adoption, potentially setting a new standard for control plane upgrade safety across the Kubernetes landscape.