External 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 tenant 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
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
Migration options​
Migrate to embedded etcd​
This feature is an Enterprise feature. See our pricing plans or contact our sales team for more information.
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 external 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 external etcd after migration, delete migrateFromDeployedEtcd: true from the vcluster.yaml:
controlPlane:
backingStore:
etcd:
embedded:
enabled: true
Config reference​
deploy object ​
Deploy defines to use an external etcd that is deployed by the helm chart
deploy object ​enabled boolean false ​
Enabled defines that an external etcd should be deployed.
enabled boolean false ​statefulSet object ​
StatefulSet holds options for the external etcd statefulSet.
statefulSet object ​enabled boolean true ​
Enabled defines if the statefulSet should be deployed
enabled boolean true ​enableServiceLinks boolean true ​
EnableServiceLinks for the StatefulSet pod
enableServiceLinks boolean true ​image object ​
Image is the image to use for the external etcd statefulSet
image object ​registry string registry.k8s.io ​
Registry is the registry of the container image, e.g. my-registry.com or ghcr.io. This setting can be globally
overridden via the controlPlane.advanced.defaultImageRegistry option. Empty means docker hub.
registry string registry.k8s.io ​repository string etcd ​
Repository is the repository of the container image, e.g. my-repo/my-image
repository string etcd ​tag string 3.6.8-0 ​
Tag is the tag of the container image, and is the default version.
tag string 3.6.8-0 ​imagePullPolicy string ​
ImagePullPolicy is the pull policy for the external etcd image
imagePullPolicy string ​env object[] [] ​
Env are extra environment variables
env object[] [] ​extraArgs string[] [] ​
ExtraArgs are appended to the etcd command.
extraArgs string[] [] ​resources object ​
Resources the etcd can consume
resources object ​limits object ​
Limits are resource limits for the container
limits object ​requests object map[cpu:20m memory:150Mi] ​
Requests are minimal resources that will be consumed by the container
requests object map[cpu:20m memory:150Mi] ​pods object ​
Pods defines extra metadata for the etcd pods.
pods object ​annotations object {} ​
Annotations are extra annotations for this resource.
annotations object {} ​labels object {} ​
Labels are extra labels for this resource.
labels object {} ​highAvailability object ​
HighAvailability are high availability options
highAvailability object ​replicas integer 1 ​
Replicas are the amount of pods to use.
replicas integer 1 ​scheduling object ​
Scheduling options for the etcd pods.
scheduling object ​nodeSelector object {} ​
NodeSelector is the node selector to apply to the pod.
nodeSelector object {} ​affinity object {} ​
Affinity is the affinity to apply to the pod.
affinity object {} ​tolerations object[] [] ​
Tolerations are the tolerations to apply to the pod.
tolerations object[] [] ​priorityClassName string ​
PriorityClassName is the priority class name for the the pod.
priorityClassName string ​podManagementPolicy string Parallel ​
PodManagementPolicy is the statefulSet pod management policy.
podManagementPolicy string Parallel ​topologySpreadConstraints object[] [] ​
TopologySpreadConstraints are the topology spread constraints for the pod.
topologySpreadConstraints object[] [] ​security object ​
Security options for the etcd pods.
security object ​podSecurityContext object {} ​
PodSecurityContext specifies security context options on the pod level.
podSecurityContext object {} ​containerSecurityContext object {} ​
ContainerSecurityContext specifies security context options on the container level.
containerSecurityContext object {} ​persistence object ​
Persistence options for the etcd pods.
persistence object ​volumeClaim object ​
VolumeClaim can be used to configure the persistent volume claim.
volumeClaim object ​enabled boolean true ​
Enabled enables deploying a persistent volume claim.
enabled boolean true ​accessModes string[] [ReadWriteOnce] ​
AccessModes are the persistent volume claim access modes.
accessModes string[] [ReadWriteOnce] ​retentionPolicy string Retain ​
RetentionPolicy is the persistent volume claim retention policy.
retentionPolicy string Retain ​size string 5Gi ​
Size is the persistent volume claim storage size.
size string 5Gi ​storageClass string ​
StorageClass is the persistent volume claim storage class.
storageClass string ​volumeClaimTemplates object[] [] ​
VolumeClaimTemplates defines the volumeClaimTemplates for the statefulSet
volumeClaimTemplates object[] [] ​addVolumes object[] [] ​
AddVolumes defines extra volumes for the pod
addVolumes object[] [] ​addVolumeMounts object[] ​
AddVolumeMounts defines extra volume mounts for the container
addVolumeMounts object[] ​name string ​
This must match the Name of a Volume.
name string ​readOnly boolean ​
Mounted read-only if true, read-write otherwise (false or unspecified).
Defaults to false.
readOnly boolean ​mountPath string ​
Path within the container at which the volume should be mounted. Must
not contain ':'.
mountPath string ​subPath string ​
Path within the volume from which the container's volume should be mounted.
Defaults to "" (volume's root).
subPath string ​mountPropagation string ​
mountPropagation determines how mounts are propagated from the host
to container and the other way around.
When not set, MountPropagationNone is used.
This field is beta in 1.10.
mountPropagation string ​subPathExpr string ​
Expanded path within the volume from which the container's volume should be mounted.
Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment.
Defaults to "" (volume's root).
SubPathExpr and SubPath are mutually exclusive.
subPathExpr string ​annotations object {} ​
Annotations are extra annotations for this resource.
annotations object {} ​labels object {} ​
Labels are extra labels for this resource.
labels object {} ​