Add a quota policy that restricts the usage of resources in your clusters.
Prerequisites
Log in to the Tanzu Mission Control console, go to the Policies page and view the quota policies for the object, as described in View the Policy Assignments for an Object.
Make sure you have the appropriate permissions.
- To create a quota policy for an object, you must be associated with the .admin role for that object.
Procedure
- On the Policies page, click the Quota tab.
- Use the tree control to navigate to and select the object for which you want to create a quota policy.
- Click Create Quota Policy.
- Select the policy template to use.
There are three preconfigured templates (small, medium, large) that define common limits on CPU and memory requests. There is also a custom template that allows you specify CPU, memory, and storage limits, as well as limits on a variety of object types, including those listed under
Object Count Quota in the Kubernetes documentation.
- Provide a policy name.
- If you choose the custom template, you can specify the aggregate resource limits to use.
- You can optionally add label selectors to include or exclude in the calculation of aggregate resource usage.
- To enter a label selector, enter the key and value, and then click Add label selector.
Make sure you click the
Add label selector button after entering the key and values. This action applies the label selector to the policy and opens a new entry field on the form.
You can optionally repeat this step to add more label selectors for this policy.
- Click Create Policy.
Results
When you click Create Policy, the new quota policy is applied to the object and is displayed on the Policies page. You can optionally repeat this procedure to create additional quota policies.