Creating a ResourceQuota

The syntax of ResourceQuota is shown as follows. Note that it's a namespaced object:

apiVersion: v1kind: ResourceQuotametadata:  name: <name>spec:  hard:    <quota_1>: <count> or <quantity>    ...  scopes:  - <scope name>  ...  scopeSelector:  - matchExpressions:      scopeName: PriorityClass      operator: <In, NotIn, Exists, DoesNotExist>      values:      - <PriorityClass name>

Only .spec.hard is a required field; .spec.scopes and .spec.scopeSelector are optional. The quota names for .spec.hard are those listed in the preceding table, and only counts or quantities are valid for their values. For example, count/pods: 10 limits pod counts to 10 in a namespace, and requests.cpu: 10000m makes sure that we don't have more requests than the amount specified ...

Get DevOps with Kubernetes - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.