Kubernetes v1.36: Unlocking the Power of Volume Group Snapshots
In the fast-paced world of cloud-native applications, data management is crucial. Kubernetes v1.36 addresses this need by promoting Volume Group Snapshots to General Availability (GA). This feature allows you to create snapshots for multiple persistent volume claims (PVCs) in one go, streamlining your backup strategy and ensuring data consistency across your applications.
Volume Group Snapshots are created by users or automation to request snapshots for a group of PVCs. The snapshot controller dynamically generates VolumeGroupSnapshotContent, which contains vital information about the created group snapshot. The process relies on a set of extension APIs that utilize label selectors to group PVCs for snapshotting. For instance, you can label your PVCs with a common identifier, such as group=myGroup, to facilitate this grouping. The configuration parameters include volumeGroupSnapshotClassName, which specifies the class to use for creating the snapshot, and the driver information that indicates the storage driver in use.
In production, ensure you are using a CSI volume driver, as this feature is specifically supported for those. Remember to define your VolumeGroupSnapshotClass properly, including the deletion policy, to avoid unexpected data loss. As this feature is now GA, you can confidently implement it in your workflows, but always keep an eye on the specifics of your storage solutions and their compatibility with Kubernetes.
Key takeaways
- →Leverage Volume Group Snapshots to manage multiple PVCs efficiently.
- →Use label selectors to group PVCs for snapshotting.
- →Define your VolumeGroupSnapshotClass with the appropriate driver and deletion policy.
- →Ensure compatibility with CSI volume drivers for proper functionality.
- →Utilize the snapshot controller for dynamic creation of VolumeGroupSnapshotContent.
Why it matters
This feature significantly reduces the complexity of managing backups for applications with multiple persistent volumes, enhancing data reliability and recovery times in production environments.
Code examples
% kubectl label pvc pvc-0
group=myGroup
persistentvolumeclaim/pvc-0 labeled1apiVersion: groupsnapshot.storage.k8s.io/v1
2kind: VolumeGroupSnapshot
3metadata:
4 name: snapshot-daily-20260422
5 namespace: demo-namespace
6spec:
7 volumeGroupSnapshotClassName: csi-groupSnapclass
8 source:
9 selector:
10 matchLabels:
11 group: myGroup1apiVersion: groupsnapshot.storage.k8s.io/v1
2kind: VolumeGroupSnapshotClass
3metadata:
4 name: csi-groupSnapclass
5driver: example.csi.k8s.io
6deletionPolicy: DeleteWhen NOT to use this
The official docs don't call out specific anti-patterns here. Use your judgment based on your scale and requirements.
Want the complete reference?
Read official docsIndustry-standard certifications built by the people behind Linux and Kubernetes. Earn the CKA — the gold standard Kubernetes administrator cert. OpsCanary readers get 30% off year-round with code OPSCANARY3.
Get CKA certified →Kubernetes v1.37: Mastering the Unused PVC Condition
Kubernetes v1.37 introduces the PersistentVolumeClaimUnusedSinceTime feature gate, now in Beta. This feature adds an Unused condition to PersistentVolumeClaims (PVCs), helping you manage storage resources more effectively. Learn how this can prevent accidental data loss and optimize your cluster's storage usage.
Hardening Kubernetes Storage: Bind Mount Options and EmptyDir Permissions
Kubernetes v1.37 introduces critical features to enhance storage security in your clusters. By utilizing bind mount options like 'noexec' and 'nosuid', you can significantly reduce the attack surface of your workloads. Dive in to learn how to implement these features effectively.
Deploying OpenBao on Kubernetes with CloudNativePG: A Step-by-Step Guide
Unlock the potential of OpenBao by integrating it with a robust CloudNativePG PostgreSQL backend. Discover how to set up a self-healing, certificate-authenticated PostgreSQL cluster that serves as an encrypted key-value store for your applications.
Get the daily digest
One email. 5 articles. Every morning.
No spam. Unsubscribe anytime.