Configure CPU and memory limits for vCluster
Error message​
When using quota limits in your vCluster project, you might encounter this error:
FailedCreate
create Pod vclusterpod-0 in StatefulSet vclusterpod failed error: admission webhook "quota.loft.sh" denied the request: pods "vclusterpod-0" is forbidden: failed quota: project-quota-test: must specify limits.cpu
This error occurs when the vCluster pod doesn't have CPU limits specified while running in a namespace with resource quotas.
Solution​
You can configure CPU and memory limits for vCluster using either the Platform UI or CLI.
Configure limits using the platform UI​
- Log in to the vCluster platform. - Access your platform dashboard. 
- Start the vCluster creation process. - Click Create vCluster. 
- Configure resource limits. - In - vcluster.yaml, add the following configuration and modify values as needed:- controlPlane:
 statefulSet:
 resources:
 limits:
 cpu: "1"
 memory: "2Gi"
- Create the vCluster. - Complete the creation process by clicking . 
Configure limits using the vCluster CLI​
- Create a configuration file. - Create a file named - values.yamlwith the following content and edit values as needed:- controlPlane:
 statefulSet:
 resources:
 limits:
 cpu: "1"
 memory: "2Gi"
- Deploy the vCluster with the configuration. - Use the vCluster CLI to create a new vCluster with the limits: - vcluster create my-vcluster --values values.yaml
Verify the configuration​
Since vCluster is deployed as a StatefulSet, verify the resource limits with the following:
kubectl get statefulset -n <vc-namespace> <vc-name> -o jsonpath="{.spec.template.spec.containers[*].resources.limits}"
This command displays the configured CPU and memory limits for your vCluster.