Skip to main content

Manage Quotas

Quotas allow you to set resource usage and count limits for the project. This works similiarly to Kubernetes ResourcesQuotas, but applies across multiple clusters. Quotas can be defined across the whole project or on a per-user/per-team basis.

Project quotas with multiple virtual clusters

Please be aware that when you create multiple virtual cluster instances, the individually used resources count toward the shared project quota.

Quotas on Active Resources

You can restrict the number of active instances for our custom instance types. These quotas are suffixed with .active. These are enforced during instance creation, but also when a request is received to wake up a sleeping instance.

Quotas on Template Template Quotas

You can restrict the number of instances that are using a given template at the same time. By selecting the instance (e.g. virtualclusterinstances), a template dropdown will automatically appear to select what template to restrict. These are enforced during instance creation.

Quotas on Generic Resources

Quotas can also specify limits on generic resources such as count/pods and limits.cpu in a similar way to a normal Kubernetes ResourceQuota object, but the limits apply to the scope of the project.

On Cluster Resource limits

Custom resources such as virtualclusterinstances can be instantly enforced as soon as consumption exceeds the limit, but on-cluster resources such as limits.cpu cannot be immediately enforced to avoid blocking requests for a long time. Users may be able to exceed the quota by small amounts by simultaneously creating resources on multiple clusters.

Adding Quotas for the Project

  1. Select the project you'd like to configure using the drop down menu. Click on Settings.

  2. Click on Quotas.

  3. Select the Per Project tab.

  4. Click on the . An entry in the quota table will appear.

  5. For the Resource column, select the desired resource to add a quota. If you wish to change this manually, you may edit the YAML directly.

  6. For the Quota column, enter a number or use the step selector to increase or decrease to the desired count.

  7. Once all project options have been specified, click the .

Adding Quotas for a User/Team

When using a quota for a user or team, it applies to all users or teams in the project and cannot be applied to specific users and teams. For example, this project defines a total virtual cluster instance quota of 20, but prevents any user or team from using more than 5 virtual cluster. By adjusting these quotas, you can ensure that no user or team uses more than their fair share of cluster resources.

  1. Select the project you'd like to configure using the drop down menu. Click on Settings.

  2. Click on Quotas.

  3. Select the Per User / Team tab.

  4. Click on the . An entry in the quota table will appear.

  5. For the Resource column, select the desired resource to add a quota. If you wish to change this manually, you may edit the YAML directly.

  6. For the Quota column, enter a number or use the step selector to increase or decrease to the desired count.

  7. Once all project options have been specified, click the .

Team and Team Member Quotas

If a team is the owner of a space or virtual cluster, the usage will be counted by the team and not count against each member of the team, nor will the usage of a team member count towards the team's quota.

Exceeding Quotas

Once quotas are defined, users and teams are free to create resources up to the defined limits. However, once the usage meets the limit, attempts to create new resources will be rejected with an error message indicating the resource type and limit that would be exceeded. Here are examples of possible error messages:

Error: metadata.name: Forbidden: cannot create spaceinstance, because project spaceinstances limit of 5 would be exceeded
Error: metadata.name: Forbidden: cannot create spaceinstance, because per-user spaceinstances limit of 5 would be exceeded
Error: metadata.name: Forbidden: cannot create virtualclusterinstance, because project virtualclusterinstances limit of 5 would be exceeded
Error: metadata.name: Forbidden: cannot create virtualclusterinstance, because per-user virtualclusterinstances limit of 5 would be exceeded
Changing Quotas

In order to avoid these errors in practice, quotas may be increased. Decreasing quotas, on the other hand, will not result in resources being automatically deleted. If you decrease quotas, resources will most likely exceed limits unless specifically cleaned up.