Skip to main content

Resource Quota

You can control vCluster resource consumption by configuring a ResourceQuota. vCluster creates the ResourceQuota in the same namespace as vCluster itself. Resource quotas apply to all resources synced to the host cluster.

Example

If you would normally deploy the following ResourceQuota:

apiVersion: v1
kind: ResourceQuota
metadata:
name: pods-medium
spec:
hard:
cpu: "10"
memory: 20Gi
pods: "10"
scopeSelector:
matchExpressions:
- operator : In
scopeName: PriorityClass
values: ["medium"]

Instead configure the ResourceQuota in your vcluster.yaml config file like this:

resourceQuota:
enabled: true
quota:
hard:
cpu: "10"
memory: 20Gi
pods: "10"
scopeSelector:
matchExpressions:
- operator : In
scopeName: PriorityClass
values: ["medium"]

Config reference

resourceQuota required object pro

ResourceQuota specifies resource quota options.

enabled required boolean pro

Enabled defines if the resource quota should be enabled.

quota required object pro

Quota are the quota options

scopeSelector required object pro

ScopeSelector is the resource quota scope selector

scopes required string[] pro

Scopes are the resource quota scopes

annotations required object pro

Annotations are extra annotations for this resource.

labels required object pro

Labels are extra labels for this resource.