StatefulSet
The vCluster control plane is deployed as a StatefulSet, since vCluster requires a PersistentVolume resource to store data across restarts. When you configure statefulSet.persistence.volumeClaim.enabled: false
or you don't configure statefulSet.persistence.volumeClaimTemplates
, vCluster is deployed as a Deployment
.
High availability
- The
highAvailability
settings let you run more than one pod for the vCluster control plane, with one running as the leader. - If the leader crashes, is unhealthy, or restarts, more pods take over leadership, depending on the number of replicas.
- Adjusting the leaseDuration / renewDeadline / retryPeriod changes the leader election behavior (how often a leader is renewed & retries when it cannot be renewed)
Scheduling
scheduling
configures various scheduler behavior for different purposes. Examples of each follow:
nodeSelector
: Matches labels on nodes to make the scheduler "prefer" scheduling the virtual cluster pods on certain nodes. Do this to:- Target nodes in a region.
- Target a specific architecture or machine class.
affinity
: Value can be affinity (attract the pod) or anti-affinity (repel the pod).- Use anti-affinity to spread pods away from each other. A common technique is to make virtual cluster pods repel each other so that they are not scheduled on the same nodes. This increases resiliency in the event a node is scaled down or replaced by a cloud provider.
- Use affinity to group certain pods together to reduce network latency for critical services
tolerations
: Another method of influencing where the scheduler places pods. A common use is to "taint" nodes for non-virtual-cluster workloads and make virtual cluster workloads "tolerate" the taint. This results in separating critical apps from the more ephemeral vCluster instances.priorityClassName
: See Pod Priority and Preemption.podManagementPolicy
: See Pod Management Policies.topologySpreadConstraints
: See Pod Topology Spread Constraints.- Similar to podAffinity & podAntiAffinity in some ways. See Comparison with podAffinity and podAntiAffinity.
Config reference
statefulSet
required object pro
StatefulSet defines options for vCluster statefulSet deployed by Helm.
statefulSet
required object prohighAvailability
required object pro
HighAvailability holds options related to high availability.
highAvailability
required object proreplicas
required integer pro
Replicas is the amount of replicas to use for the statefulSet.
replicas
required integer proleaseDuration
required integer pro
LeaseDuration is the time to lease for the leader.
leaseDuration
required integer prorenewDeadline
required integer pro
RenewDeadline is the deadline to renew a lease for the leader.
renewDeadline
required integer proretryPeriod
required integer pro
RetryPeriod is the time until a replica will retry to get a lease.
retryPeriod
required integer proresources
required object pro
Resources are the resource requests and limits for the statefulSet container.
resources
required object proscheduling
required object pro
Scheduling holds options related to scheduling.
scheduling
required object pronodeSelector
required object pro
NodeSelector is the node selector to apply to the pod.
nodeSelector
required object proaffinity
required object pro
Affinity is the affinity to apply to the pod.
affinity
required object protolerations
required object[] pro
Tolerations are the tolerations to apply to the pod.
tolerations
required object[] propriorityClassName
required string pro
PriorityClassName is the priority class name for the the pod.
priorityClassName
required string propodManagementPolicy
required string pro
PodManagementPolicy is the statefulSet pod management policy.
podManagementPolicy
required string protopologySpreadConstraints
required object[] pro
TopologySpreadConstraints are the topology spread constraints for the pod.
topologySpreadConstraints
required object[] prosecurity
required object pro
Security defines pod or container security context.
security
required object proprobes
required object pro
Probes enables or disables the main container probes.
probes
required object prolivenessProbe
required object pro
LivenessProbe specifies if the liveness probe for the container should be enabled
livenessProbe
required object proenabled
required boolean false pro
Enabled defines if this option should be enabled.
enabled
required boolean false propersistence
required object pro
Persistence defines options around persistence for the statefulSet.
persistence
required object provolumeClaim
required object pro
VolumeClaim can be used to configure the persistent volume claim.
volumeClaim
required object proenabled
required string|boolean pro
Enabled enables deploying a persistent volume claim. If auto, vCluster will automatically determine
based on the chosen distro and other options if this is required.
enabled
required string|boolean proaccessModes
required string[] pro
AccessModes are the persistent volume claim access modes.
accessModes
required string[] proretentionPolicy
required string pro
RetentionPolicy is the persistent volume claim retention policy.
retentionPolicy
required string prosize
required string pro
Size is the persistent volume claim storage size.
size
required string prostorageClass
required string pro
StorageClass is the persistent volume claim storage class.
storageClass
required string provolumeClaimTemplates
required object[] pro
VolumeClaimTemplates defines the volumeClaimTemplates for the statefulSet
volumeClaimTemplates
required object[] proaddVolumes
required object[] pro
AddVolumes defines extra volumes for the pod
addVolumes
required object[] proaddVolumeMounts
required object[] pro
AddVolumeMounts defines extra volume mounts for the container
addVolumeMounts
required object[] proname
required string pro
This must match the Name of a Volume.
name
required string proreadOnly
required boolean false pro
Mounted read-only if true, read-write otherwise (false or unspecified).
Defaults to false.
readOnly
required boolean false promountPath
required string pro
Path within the container at which the volume should be mounted. Must
not contain ':'.
mountPath
required string prosubPath
required string pro
Path within the volume from which the container's volume should be mounted.
Defaults to "" (volume's root).
subPath
required string promountPropagation
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 prosubPathExpr
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 proenableServiceLinks
required boolean false pro
EnableServiceLinks for the StatefulSet pod
enableServiceLinks
required boolean false proannotations
required object pro
Annotations are extra annotations for this resource.
annotations
required object prolabels
required object pro
Labels are extra labels for this resource.
labels
required object propods
required object pro
Additional labels or annotations for the statefulSet pods.
pods
required object proimage
required object pro
Image is the image for the controlPlane statefulSet container
image
required object proregistry
required string pro
Configure the registry of the container image, e.g. my-registry.com or ghcr.io
It defaults to ghcr.io and can be overriding either by using this field or controlPlane.advanced.defaultImageRegistry
registry
required string prorepository
required string pro
Configure the repository of the container image, e.g. my-repo/my-image.
It defaults to the vCluster pro repository that includes the optional pro modules that are turned off by default.
If you still want to use the pure OSS build, use 'loft-sh/vcluster-oss' instead.
repository
required string protag
required string pro
Tag is the tag of the container image, e.g. latest
tag
required string proimagePullPolicy
required string pro
ImagePullPolicy is the policy how to pull the image.
imagePullPolicy
required string proworkingDir
required string pro
WorkingDir specifies in what folder the main process should get started.
workingDir
required string procommand
required string[] pro
Command allows you to override the main command.
command
required string[] proargs
required string[] pro
Args allows you to override the main arguments.
args
required string[] proenv
required object[] pro
Env are additional environment variables for the statefulSet container.
env
required object[] pro