Skip to main content
Version: v0.38 Stable

Deployed etcd

Supported Configurations
Running the control plane as a container with:

When using this backing store option, etcd is deployed on the control plane cluster in the same namespace as the vClustervClusterAn open-source software product that creates and manages clusters within Kubernetes infrastructure. vCluster provides tenant isolation capabilities while reducing infrastructure costs.Related: Cluster, Control plane cluster control plane pod. vCluster deploys etcd with a StatefulSet, Service, and headless Service.

controlPlane:
backingStore:
etcd:
deploy:
enabled: true
Snapshots aren't supported with deployed etcd

vcluster snapshot create, vcluster restore, and scheduled snapshots aren't supported for backing up or restoring a cluster that already runs on this backing store. Deployed etcd is a supported target when migrating an embedded etcd snapshot. See Back up and restore.

Customize the resources​

You can customize the resources that is deployed for etcd. Here are some basic examples, but more options exist in the configuration.

Set resource requests for the StatefulSet​

controlPlane:
backingStore:
etcd:
deploy:
enabled: true
statefulSet:
resources:
requests:
cpu: 20m
memory: 150Mi

Add annotations to each etcd component​

controlPlane:
backingStore:
etcd:
deploy:
enabled: true
statefulSet:
annotations:
app.kubernetes.io/part-of: "etcd"
cluster-autoscaler.kubernetes.io/safe-to-evict: "false"
service:
annotations:
app.kubernetes.io/part-of: "etcd"
headlessService:
annotations:
app.kubernetes.io/part-of: "etcd"

Set the security context of the StatefulSet​

controlPlane:
backingStore:
etcd:
deploy:
enabled: true
statefulSet:
security:
podSecurityContext:
allowPrivilegeEscalation: false

Back up and restore​

vCluster snapshot and restore aren't supported for backing up or restoring a cluster that already runs on deployed etcd. vcluster snapshot create isn't blocked and can appear to succeed, but the result isn't validated, so don't rely on it to recover a cluster. The same applies to vcluster restore and scheduled snapshots.

Deployed etcd is, however, a supported target when migrating an embedded etcd snapshot onto a new cluster. See Migrate from embedded etcd to a different backing store.

To move off this backing store, see Migration options.

Migration options​

Migrate to embedded etcd​

You can migrate from deployed etcdetcdA distributed key-value store that provides reliable storage for Kubernetes cluster data. In vCluster, etcd can be deployed externally or embedded within the vCluster pod.Related: Control Plane to embedded etcd without data loss. This migration simplifies your deployment and reduces resource consumption.

Migration guide available

For step-by-step instructions on migrating from deployed to embedded etcd while preserving all your data, see the complete migration guide.

vcluster.yaml
controlPlane:
backingStore:
etcd:
embedded:
enabled: true
migrateFromDeployedEtcd: true

Deploying with migrateFromDeployedEtcd: true retains the deployed etcd StatefulSet to perform the migration. After a successful migration, you should see the Successfully migrated etcd database to embedded etcd log message in vCluster. To remove the deployed etcd after migration, delete migrateFromDeployedEtcd: true from the vcluster.yaml:

vcluster.yaml after etcd migration
controlPlane:
backingStore:
etcd:
embedded:
enabled: true

Config reference​

For every field under controlPlane.backingStore.etcd.deploy, see the controlPlane reference.