Deployed etcd
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. control plane pod. vCluster deploys etcd with a StatefulSet, Service, and headless Service.
controlPlane:
backingStore:
etcd:
deploy:
enabled: true
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. to embedded etcd without data loss. This migration simplifies your deployment and reduces resource consumption.
For step-by-step instructions on migrating from deployed to embedded etcd while preserving all your data, see the complete migration guide.
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:
controlPlane:
backingStore:
etcd:
embedded:
enabled: true
Config reference​
For every field under controlPlane.backingStore.etcd.deploy, see the controlPlane reference.