External etcd
Enabling this feature deploys etcd on the host cluster in the same namespace as the virtual cluster and configures the control plane to use it as the backing store. vCluster deploys etcd with a StatefulSet
, Service
, and headless Service
.
controlPlane:
backingStore:
etcd:
deploy:
enabled: true
...
You can customize the StatefulSet
that vCluster uses to deploy etcd. One of the more common customizations is to set resource requests:
controlPlane:
backingStore:
etcd:
deploy:
enabled: true
statefulSet:
resources:
requests:
cpu: 20m
memory: 150Mi
Add optional 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"
After deploying your vCluster, changing the backing store of vCluster is not supported.
Migrate to embedded etcd​
This feature is available in the vCluster Pro tier. Contact us for more details and to start a trial.
For vCluster Pro users, it is possible to migrate the backing store of a virtual
cluster from the external to embedded etcd controlPlane.backingstore.etcd.embedded
.
Config reference​
deploy
required object pro​
Deploy defines to use an external etcd that is deployed by the helm chart
deploy
required object pro​enabled
required boolean false pro​
Enabled defines that an external etcd should be deployed.
enabled
required boolean false pro​statefulSet
required object pro​
StatefulSet holds options for the external etcd statefulSet.
statefulSet
required object pro​enabled
required boolean true pro​
Enabled defines if the statefulSet should be deployed
enabled
required boolean true pro​enableServiceLinks
required boolean true pro​
EnableServiceLinks for the StatefulSet pod
enableServiceLinks
required boolean true pro​image
required object pro​
Image is the image to use for the external etcd statefulSet
image
required object pro​registry
required string registry.k8s.io pro​
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
required string registry.k8s.io pro​repository
required string etcd pro​
Repository is the repository of the container image, e.g. my-repo/my-image
repository
required string etcd pro​tag
required string 3.5.13-0 pro​
Tag is the tag of the container image, e.g. latest
tag
required string 3.5.13-0 pro​imagePullPolicy
required string pro​
ImagePullPolicy is the pull policy for the external etcd image
imagePullPolicy
required string pro​env
required object[] [] pro​
Env are extra environment variables
env
required object[] [] pro​extraArgs
required string[] [] pro​
ExtraArgs are appended to the etcd command.
extraArgs
required string[] [] pro​resources
required object pro​
Resources the etcd can consume
resources
required object pro​pods
required object pro​
Pods defines extra metadata for the etcd pods.
pods
required object pro​highAvailability
required object pro​
HighAvailability are high availability options
highAvailability
required object pro​replicas
required integer 1 pro​
Replicas are the amount of pods to use.
replicas
required integer 1 pro​scheduling
required object pro​
Scheduling options for the etcd pods.
scheduling
required object pro​nodeSelector
required object {} pro​
NodeSelector is the node selector to apply to the pod.
nodeSelector
required object {} pro​affinity
required object {} pro​
Affinity is the affinity to apply to the pod.
affinity
required object {} pro​tolerations
required object[] [] pro​
Tolerations are the tolerations to apply to the pod.
tolerations
required object[] [] pro​priorityClassName
required string pro​
PriorityClassName is the priority class name for the the pod.
priorityClassName
required string pro​podManagementPolicy
required string Parallel pro​
PodManagementPolicy is the statefulSet pod management policy.
podManagementPolicy
required string Parallel pro​topologySpreadConstraints
required object[] [] pro​
TopologySpreadConstraints are the topology spread constraints for the pod.
topologySpreadConstraints
required object[] [] pro​security
required object pro​
Security options for the etcd pods.
security
required object pro​persistence
required object pro​
Persistence options for the etcd pods.
persistence
required object pro​volumeClaim
required object pro​
VolumeClaim can be used to configure the persistent volume claim.
volumeClaim
required object pro​enabled
required boolean true pro​
Enabled enables deploying a persistent volume claim.
enabled
required boolean true pro​accessModes
required string[] [ReadWriteOnce] pro​
AccessModes are the persistent volume claim access modes.
accessModes
required string[] [ReadWriteOnce] pro​retentionPolicy
required string Retain pro​
RetentionPolicy is the persistent volume claim retention policy.
retentionPolicy
required string Retain pro​size
required string 5Gi pro​
Size is the persistent volume claim storage size.
size
required string 5Gi pro​storageClass
required string pro​
StorageClass is the persistent volume claim storage class.
storageClass
required string pro​volumeClaimTemplates
required object[] [] pro​
VolumeClaimTemplates defines the volumeClaimTemplates for the statefulSet
volumeClaimTemplates
required object[] [] pro​addVolumes
required object[] [] pro​
AddVolumes defines extra volumes for the pod
addVolumes
required object[] [] pro​addVolumeMounts
required object[] pro​
AddVolumeMounts defines extra volume mounts for the container
addVolumeMounts
required object[] pro​name
required string pro​
This must match the Name of a Volume.
name
required string pro​readOnly
required boolean pro​
Mounted read-only if true, read-write otherwise (false or unspecified).
Defaults to false.
readOnly
required boolean pro​mountPath
required string pro​
Path within the container at which the volume should be mounted. Must
not contain ':'.
mountPath
required string pro​subPath
required string pro​
Path within the volume from which the container's volume should be mounted.
Defaults to "" (volume's root).
subPath
required string pro​mountPropagation
required string pro​
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
required string pro​subPathExpr
required string pro​
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
required string pro​annotations
required object {} pro​
Annotations are extra annotations for this resource.
annotations
required object {} pro​labels
required object {} pro​
Labels are extra labels for this resource.
labels
required object {} pro​service
required object pro​
Service holds options for the external etcd service.
service
required object pro​headlessService
required object pro​
HeadlessService holds options for the external etcd headless service.
headlessService
required object pro​