Skip to content
DevOps

Storage Version Migration in Kubernetes v1.37: What It Means for DevOps

Storage Version Migration is now stable in Kubernetes v1.37, simplifying API resource updates. Learn how it impacts your cluster management.

Topic
DevOps
Reading time
4 min
Length
945 words
Published
Sep 1, 2026
10:53 pm IST
In this article
  1. Introduction to Storage Version Migration in Kubernetes v1.37
  2. Why Storage Version Migration Matters
  3. Implications for Security and Compliance
  4. How Storage Version Migration Works
  5. Monitoring and Verifying Migrations
  6. Integrating Migrations with CRD Manifests
  7. Practical Steps for DevOps Teams
  8. Limitations and Considerations

Introduction to Storage Version Migration in Kubernetes v1.37

In the latest Kubernetes v1.37 release, Storage Version Migration (SVM) has reached General Availability (GA). This marks a significant milestone as the built-in StorageVersionMigration API and its controller in the Kubernetes control plane are now stable and enabled by default across all v1.37 clusters. This change brings a new level of efficiency and reliability to the way stored API resources are updated within Kubernetes clusters.

Why Storage Version Migration Matters

In Kubernetes, API resources are stored using a specific storage version, a schema representation crucial for the system's interaction with object storage. The need to update these storage versions arises in various scenarios, such as promoting a CustomResourceDefinition (CRD) from an older API version (e.g., v1alpha1) to a newer one (e.g., v1beta1 and v1). In such cases, resources stored with the old version can become problematic.

For instance, if you designate v1 as the new storage version, new writes will use it, but existing resources might still be stored as v1alpha1 or v1beta1. This prevents the safe removal of older versions from the CRD's .status.storedVersions until all resources are re-written to the new version. This is where Storage Version Migration provides a streamlined solution by ensuring that all resources are updated to the latest storage version automatically.

Implications for Security and Compliance

Apart from schema updates, Storage Version Migration is crucial for security and compliance, particularly in scenarios involving encryption at rest. When you configure such encryption or rotate encryption keys, existing resources remain unencrypted or encrypted under old keys until they are re-written. Before, this required manual interventions or deploying additional components like the out-of-tree kube-storage-version-migrator, which were tedious and error-prone. The built-in SVM controller automates this, reducing the risk of human error and easing compliance efforts. By automating the rewriting of resources, SVM ensures that encryption policies are uniformly applied across all stored resources.

How Storage Version Migration Works

To initiate a storage version migration, you simply create a declarative StorageVersionMigration object. The Kubernetes control plane includes a StorageVersionMigrator controller that watches for these objects, automatically migrating existing resources to the default storage version for that API.

Consider an example where you update a CRD for crontabs.example.com to use v1 as its storage version. You would create a StorageVersionMigration resource like this:

apiVersion: storagemigration.k8s.io/v1
kind: StorageVersionMigration
metadata:
  name: crontabs-migration
spec:
  resource:
    group: example.com
    resource: crontabs

Apply the manifest using kubectl:

kubectl apply -f crontabs-migration.yaml

The StorageVersionMigrator controller then takes over, inspecting the current storage versions of the resources and rewriting them to align with the specified storage version. This process ensures that resources are consistently stored in the latest format, facilitating future updates and maintenance.

Monitoring and Verifying Migrations

Once the migration is initiated, the StorageVersionMigrator controller updates the status of the StorageVersionMigration object to reflect the migration's progress. You can inspect this status using kubectl:

kubectl get storageversionmigration.storagemigration.k8s.io/crontabs-migration -o yaml

A successful migration will show a Succeeded condition set to True, indicating all instances of the resource are updated to the current storage version. For CRDs, ensure the .status.storedVersions is updated to only contain the preferred version. If not, it implies the CRD was updated during migration and the process should be retried.

Regular monitoring of the migration status is crucial, especially in large clusters where the process might take significant time. By keeping an eye on the migration status, you can quickly detect and address issues, such as failed migrations or resources that remain in older versions.

Integrating Migrations with CRD Manifests

Since StorageVersionMigration is a standard declarative API in Kubernetes, CRD authors can bundle migrations with CRD upgrades. For instance, you can include the migration in the same manifest as your updated CRD:

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: crontabs.example.com
spec:
  group: example.com
  # Updated versions list where v1 has storage: true
  ...
---
apiVersion: storagemigration.k8s.io/v1
kind: StorageVersionMigration
metadata:
  name: crontabs-migration
spec:
  resource:
    group: example.com
    resource: crontabs

This integration ensures that migrations are automatically triggered alongside CRD updates, streamlining the update process and reducing the administrative overhead. By embedding migration steps within CRD manifests, you can ensure consistency and minimize the risk of oversight during upgrades.

Practical Steps for DevOps Teams

For DevOps teams managing Kubernetes clusters, incorporating storage version migration into your workflow can significantly enhance your cluster's stability and security. Here's what I'd recommend doing about this on Monday:

  • Review your current CRDs and identify any that could benefit from storage version migration, especially those in older API versions.
  • Prepare StorageVersionMigration manifests for these CRDs, ensuring your team is familiar with their structure and application.
  • Integrate migration processes into your existing CI/CD pipelines to automate future updates. This can be achieved by adding migration steps to deployment scripts, ensuring that storage version updates occur seamlessly during regular deployments.
  • Monitor migrations closely using kubectl to verify successful completion and address any issues promptly. Regular checks can prevent small issues from escalating into larger problems.
  • Ensure that your team is trained on interpreting migration statuses and troubleshooting common issues that might arise during the migration process.

Limitations and Considerations

While storage version migration simplifies many aspects of resource management, it doesn't solve every challenge. It's not a substitute for comprehensive testing when updating CRDs or encryption configurations. Also, consider the potential impact of migrations on cluster performance, particularly in large-scale environments where resource write operations may introduce latency.

Moreover, not all resources will require migration, so prioritize those that do. For detailed scenarios, consulting with Kubernetes documentation and community resources, such as the #sig-api-machinery Slack channel, can be invaluable. Additionally, be mindful of the time and resources required for migrations in large clusters, as they may impact performance during peak operation times.

Sources

Kubernetes v1.37: Storage Version Migration Enabled by Default

Every claim above was checked against this source before publishing. The analysis, the code and the opinions are mine.

Frequently asked

What is Storage Version Migration in Kubernetes?

Storage Version Migration is a feature that automates the process of updating stored API resources to the latest storage version, ensuring consistency and enabling safe deprecation of older versions.

How do I initiate a storage version migration?

You can initiate a migration by creating a declarative StorageVersionMigration object and applying it using kubectl.

What should I do if a migration fails?

If a migration fails, check the status of the StorageVersionMigration object using kubectl for error details and consider retrying the migration after addressing any issues.

Deepak Kumar

Written by

Deepak Kumar

Sr Software Engineer at India Today Group | Aaj Tak · MERN Stack · Generative AI

I build production web applications and Generative AI systems — React and Next.js on the front, Node.js and RAG pipelines behind them. I write here about what those systems actually do once real traffic hits them.

Message me