| Enterprise | ||||
|---|---|---|---|---|
| Available in these plans | Free | Dev | Prod | Scale |
| Auto Snapshots | ||||
Free, Dev, Prod, and Scale are vCluster Platform license plans. Open source does not need a license or a Platform connection. See Compare open source and free tiers.
This feature is an Enterprise feature. See our pricing plans or contact our sales team for more information.
Snapshots
vClustervClusterAn open-source software product that creates and manages tenant clusters within Kubernetes infrastructure. vCluster provides tenant isolation capabilities while reducing infrastructure costs. Platform allows you to configure taking snapshots of the vCluster at specific intervals.
For on-demand snapshot creation and restore operations, see the vCluster Snapshot and Restore documentation.
This allows administrators to capture and store the vCluster state in scheduled intervals to help protect against infrastructure failures, data corruption, and configuration errors. By maintaining consistent recovery points, administrators can quickly restore the vCluster to a known good state without relying on manual backup processes. If you use private nodes, see Use snapshots with private nodes for additional restore steps.
Snapshots aren't supported with deployed etcd (controlPlane.backingStore.etcd.deploy), so don't rely on scheduled snapshots to protect those tenant clusters.
In the vcluster.yaml, it is configured under snapshots. Using the UI, you
can configure the management of snapshots in the config options of a tenant clusterTenant clusterA fully isolated Kubernetes environment provisioned for a single tenant. Each tenant cluster has its own API server, controller manager, and resource namespace, backed by a virtualized control plane hosted on a control plane cluster. From the tenant's perspective it behaves exactly like a standard Kubernetes cluster. under Snapshots. Though
snapshot configuration is configured on the tenant cluster itself, the capability and logic of scheduling snapshots
is in vCluster Platform.
Auto Snapshot requires platform v4.4.0 or later.
Configureβ
- vcluster.yaml
- vCluster CLI
- Platform UI
Enable auto snapshotsβ
To enable auto snapshots, add the following configuration to your vcluster.yaml:
snapshots:
auto:
# Take a snapshot every 12 hours
schedule: 0 */12 * * *
# Default is UTC
# Options are at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
timezone: America/New_York
retention:
period: 30
maxSnapshots: 14
storage:
type: s3
s3:
url: s3://my-bucket/path
S3 bucket exampleβ
Snapshots can be stored in an S3 bucket. Automatic snapshots are supported for standalone deployments, with two differences: AWS pod identity authentication is not available, and the credentials secret must be created in the project namespace of the standalone cluster. AWS pod identity authentication is not supported for standalone deployments. Use S3 credentials stored in a Kubernetes secret instead. When using AWS S3 buckets, it is recommended to authenticate using AWS pod identity. The EKS Pod Identity association must be created for the vCluster control plane pod. The vCluster control plane pod is the one that runs inside the control plane cluster namespace automatically created by vCluster Platform for each vClusterβtypically named: Alternatively, you can create a Kubernetes secret with your S3 credentials. For standalone deployments, the secret must be created in the project namespace where the standalone cluster is created. The Create a Kubernetes secret of your S3 credentials. Create this secret on the host of where the vCluster control plane is deployed. It could be deployed in the namespace
of the vCluster or a different namespace. If the vCluster is externally deployed, ensure the vCluster ClusterRole has permission to read the secret. The vCluster ClusterRole follows the naming pattern The secret needs to contain all these three keys: Create a vCluster referencing those credentials.Configure snapshots with S3
S3 configuration optionsβ
Option Description auto.storage.type.s3.urlURL of the AWS S3 bucket. Must be pre-fixed with s3://.auto.storage.type.s3.credentialReferences the AWS credentials as a Kubernetes secret auto.storage.type.s3.credential.nameName of the Kubernetes secret. auto.storage.type.s3.credential.namespaceNamespace of the Kubernetes secret. The secret must be deployed on the host of where the vCluster control plane pod is deployed to. Authenticate with AWS Pod identityβ
loft-<project-name>-<vcluster-name>. By default, this pod uses the service account: vc-<vcluster-name>. This is the service account that must be associated with your EKS Pod Identity role so that the vCluster control plane can authenticate to AWS when performing scheduled snapshot creation to S3.Authenticate with S3 credentials as a secretβ
credential.namespace field is still part of the schema, but standalone deployments ignore it at runtime and always read the secret from that project namespace.vc-<vClusterName>-v-<vClusterNamespace>.
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_SESSION_TOKENAWS_SESSION_TOKEN must be present in the secret even if you don't use one. This applies to long-term static credentials and to S3-compatible storage that doesn't issue session tokens, such as MinIO, Ceph, or Dell ECS. If you don't have a session token, set the key to an empty string.
OCI image registriesβ
Configure snapshots with OCI
OCI configuration optionsβ
| Option | Description |
|---|---|
auto.storage.type.oci.repository | OCI registry address. Must be pre-fixed with oci:// |
auto.storage.type.oci.credential | Reference the OCI credentials as a Kubernetes secret |
auto.storage.type.oci.credential.name | Name of the Kubernetes secret |
auto.storage.type.oci.credential.namespace | Namespace of the Kubernetes secret. The secret must be deployed on the host of where the vCluster control plane pod is deployed to. |
auto.storage.type.oci.username | Username of the credentials to access the OCI registry |
auto.storage.type.oci.password | Password of the credentials to access the OCI registry |
Authenticate with credentials in a Kubernetes secretβ
It's recommended to store your credentials to your OCI registry in a secret and reference the secret in the vcluster.yaml of your tenant cluster configuration. This protects the details of your credentials.
For standalone deployments, the secret must be created in the project namespace where the standalone cluster is created. The credential.namespace field is still part of the schema, but standalone deployments ignore it at runtime and always read the secret from that project namespace.
Create a Kubernetes secret of your credentials to your OCI registry.
Create this secret on the host of where the vCluster control plane is deployed. It could be deployed in the namespace of the vCluster or a different namespace. If the vCluster is externally deployed, ensure the vCluster ClusterRole has permission to read the secret. The vCluster ClusterRole follows the naming pattern
vc-<vClusterName>-v-<vClusterNamespace>.The secret needs to contain:
usernamepassword
Create OCI credentials secretkubectl create -f - <<EOFapiVersion: v1kind: Secrettype: Opaquemetadata:name: oci-crednamespace: p-defaultdata:username: "id" # username to authenticate with the OCI registrypassword: "key" # password base64 to authenticate with the OCI registryEOFCreate a vCluster referencing those credentials.
Example vcluster.yaml referencing the Kubernetes secretsnapshots:auto:# Take a snapshot every 12 hoursschedule: 0 */12 * * *storage:type: ocioci:# Location of OCI registry# Must be prefixed with `oci://`repository: oci://my-registry/snapshotscredential:secretName: oci-credsecretNamespace: p-default
Authenticate without a Kubernetes secretβ
If you do not want to use a secret, you can also explicitly set the username and password
directly in the vcluster.yaml.
snapshots:
auto:
# Take a snapshot every 12 hours
schedule: 0 */12 * * *
storage:
type: oci
oci:
# Location of OCI registry
# Must be prefixed with `oci://`
repository: oci://my-registry/snapshots
username: "my-username"
password: "my-password"
Create an OCI snapshot (Helm driver)β
For tenant clusters deployed with the Helm driver (without platform):
vcluster snapshot create VCLUSTER_NAME --namespace NAMESPACE oci://ghcr.io/my-user/my-repo:my-tag
This will take a snapshot of the tenant cluster and saves it as an OCI image.
Create an AWS S3 snapshot (Helm driver)β
For tenant clusters deployed with the Helm driver (without platform):
vcluster snapshot create VCLUSTER_NAME --namespace NAMESPACE s3://my-bucket/my-bucket-key
This will take a snapshot of the tenant cluster and saves it to a AWS S3 bucket.
Configure additional encryption settings for AWS with these flags:
--customer-key-encryption-file--kms-key-id--server-side-encryption
Create a container filesystem snapshot (Helm driver)β
For tenant clusters deployed with the Helm driver (without platform):
vcluster snapshot create VCLUSTER_NAME --namespace NAMESPACE container:///data/my-local-snapshot.tar.gz
This will take a snapshot of the tenant cluster to the vCluster container filesystem.
From the project drop-down menu (top left corner), select the project you'd like to create the tenant cluster in.
Click on Virtual Clusters.
Click on Edit on the tenant cluster that you want to edit.
Select the expander, toggle the Enable Snapshots slider to enable auto snapshots and configure accordingly.
Click on the button to save the changes.
Auto snapshots on standalone tenant clustersβ
Auto snapshots on a standalone tenant cluster require vCluster v0.37 or later, in addition to the platform version requirement above. The standalone runtime needs to pull its own storage credentials from the platform, which it can only do from v0.37 onward.
These restrictions apply no matter which method above you use to configure auto snapshots. Standalone tenant clusters have additional restrictions on snapshots.auto.storage:
- Only
s3,oci, andazureare supported.container(local filesystem) storage is rejected. The volume exists only inside the tenant cluster, so the platform can't list or prune it from outside. - A storage credential must be configured explicitly. Ambient cloud identity, such as an AWS instance profile or IRSA, isn't available. The platform resolves credentials on the tenant's behalf, and has no access to the tenant's own cloud identity.
- An Azure Blob URL containing a SAS token is rejected, since it would persist the token in plaintext in the tenant's snapshot request.
- Any configured
secretNamespaceon the storage credential is ignored. The platform always reads the credential Secret from the Platform project namespace containing the VirtualClusterInstance, regardless ofsecretNamespace. This restriction is specific to standalone. Pod-based tenant clusters honorsecretNamespacenormally.
To avoid giving the tenant cluster standing access to the credential Secret, the platform exposes a snapshotcredentials API. A standalone tenant cluster retrieves the configured credentials at snapshot time and uses them in memory without persisting them. The platform doesn't shorten or rotate credentials stored in the Secret.
The restore workflow also splits differently for standalone. Snapshot creation is delegated to the tenant cluster itself, since only it can snapshot its own etcd. The platform drops a request in the tenant's own kube-system namespace, and the tenant cluster reconciles it. Snapshot list and delete run on the platform side directly against the object store instead, since those operations don't need access to the tenant cluster. See Restore a standalone vCluster for the restore side.
Config referenceβ
snapshots object β
Snapshots holds configuration for automatic vCluster snapshots.
snapshots object βauto object β
Auto holds automatic snapshot configuration
auto object βschedule string β
Schedule specifies a scheduled time in Cron format, see https://en.wikipedia.org/wiki/Cron for a tenant cluster snapshot to be taken
schedule string βtimezone string β
Timezone specifies time zone used for scheduled snapshot operations. Defaults to UTC.
Accepts the same format as time.LoadLocation() in Go (https://pkg.go.dev/time#LoadLocation).
The value should be a location name corresponding to a file in the IANA Time Zone database, such as "America/New_York".
timezone string βretention object β
Retention specifies how long snapshots will be kept
retention object βperiod integer β
Period defines the number of days a snapshot will be kept
period integer βmaxSnapshots integer β
MaxSnapshots defines the number of snapshots that can be taken
maxSnapshots integer βstorage object β
Storage specifies where the snapshot will be stored
storage object βtype string β
Type specifies supported type of storage services for a snapshot S3/OCI/Container, see https://www.vcluster.com/docs/vcluster/manage/backup-restore#store-snapshots-in-s3-buckets
type string βs3 object β
S3 holds configuration for storing snapshots in S3-compatible bucket
s3 object βurl string β
Url specifies url to the storage service
url string βoci object β
OCI holds configuration for storing snapshots in OCI image registries
oci object βrepository string β
Repository OCI repository to store the snapshot
repository string βcredential object β
Credential secret with the OCI Credentials
credential object βsecretName string β
SecretName is the secret name with credential
secretName string βsecretNamespace string β
SecretNamespace is the secret namespace with credential
secretNamespace string βusername string β
Username to authenticate with the OCI registry
username string βpassword string β
Password to authenticate with the OCI registry
password string βcontainer object β
Container holds configuration for storing snapshots as local files inside a vCluster container
container object βpath string β
Path specifies directory to store the snapshot
path string βazure object β
Azure holds configuration for storing snapshots in Azure Blob Storage
azure object βblobUrl string β
BlobURL specifies the Azure Blob Storage URL in the format https://{account}.blob.core.windows.net/{container}/{path}
blobUrl string βcredential object β
Credential secret with the Azure credentials. The secret should contain either:
AZURE_STORAGE_KEY (storage account access key), or
AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_SUBSCRIPTION_ID, AZURE_RESOURCE_GROUP (service principal)
credential object βsecretName string β
SecretName is the secret name with credential
secretName string βsecretNamespace string β
SecretNamespace is the secret namespace with credential
secretNamespace string β