Update 1.3 example for quota
This commit is contained in:
@@ -23,7 +23,7 @@ Resource quotas work like this:
|
||||
- If quota is enabled in a namespace for compute resources like `cpu` and `memory`, users must specify
|
||||
requests or limits for those values; otherwise, the quota system may reject pod creation. Hint: Use
|
||||
the LimitRange admission controller to force defaults for pods that make no compute resource requirements.
|
||||
See the [walkthrough](/docs/admin/resourcequota/walkthrough.md) for an example to avoid this problem.
|
||||
See the [walkthrough](/docs/admin/resourcequota/walkthrough/) for an example to avoid this problem.
|
||||
|
||||
Examples of policies that could be created using namespaces and quotas are:
|
||||
|
||||
@@ -52,31 +52,31 @@ Resource Quota is enforced in a particular namespace when there is a
|
||||
The total sum of [compute resources](/docs/user-guide/compute-resources) requested by pods
|
||||
in a namespace can be limited. The following compute resource types are supported:
|
||||
|
||||
| ResourceName | Description |
|
||||
| Resource Name | Description |
|
||||
| ------------ | ----------- |
|
||||
| cpu | Across all pods in a non-terminal state, the sum of CPU requests cannot exceed this value. |
|
||||
| limits.cpu | Across all pods in a non-terminal state, the sum of CPU limits cannot exceed this value. |
|
||||
| limits.memory | Across all pods in a non-terminal state, the sum of memory limits cannot exceed this value. |
|
||||
| memory | Across all pods in a non-terminal state, the sum of memory requests cannot exceed this value. |
|
||||
| requests.cpu | Across all pods in a non-terminal state, the sum of CPU requests cannot exceed this value. |
|
||||
| requests.memory | Across all pods in a non-terminal state, the sum of memory requests cannot exceed this value. |
|
||||
| `cpu` | Across all pods in a non-terminal state, the sum of CPU requests cannot exceed this value. |
|
||||
| `limits.cpu` | Across all pods in a non-terminal state, the sum of CPU limits cannot exceed this value. |
|
||||
| `limits.memory` | Across all pods in a non-terminal state, the sum of memory limits cannot exceed this value. |
|
||||
| `memory` | Across all pods in a non-terminal state, the sum of memory requests cannot exceed this value. |
|
||||
| `requests.cpu` | Across all pods in a non-terminal state, the sum of CPU requests cannot exceed this value. |
|
||||
| `requests.memory` | Across all pods in a non-terminal state, the sum of memory requests cannot exceed this value. |
|
||||
|
||||
## Object Count Quota
|
||||
|
||||
The number of objects of a given type can be restricted. The following types
|
||||
are supported:
|
||||
|
||||
| ResourceName | Description |
|
||||
| Resource Name | Description |
|
||||
| ------------ | ----------- |
|
||||
| configmaps | The total number of config maps that can exist in the namespace. |
|
||||
| persistentvolumeclaims | The total number of [persistent volume claims](/docs/user-guide/persistent-volumes/#persistentvolumeclaims) that can exist in the namespace. |
|
||||
| pods | The total number of pods in a non-terminal state that can exist in the namespace. A pod is in a terminal state if `status.phase in (Failed, Succeeded)` is true. |
|
||||
| replicationcontrollers | The total number of replication controllers that can exist in the namespace. |
|
||||
| resourcequotas | The total number of [resource quotas](/docs/admin/admission-controllers/#resourcequota) that can exist in the namespace. |
|
||||
| services | The total number of services that can exist in the namespace. |
|
||||
| services.loadbalancers | The total number of services of type load balancer that can exist in the namespace. |
|
||||
| services.nodeports | The total number of services of type node port that can exist in the namespace. |
|
||||
| secrets | The total number of secrets that can exist in the namespace. |
|
||||
| `configmaps` | The total number of config maps that can exist in the namespace. |
|
||||
| `persistentvolumeclaims` | The total number of [persistent volume claims](/docs/user-guide/persistent-volumes/#persistentvolumeclaims) that can exist in the namespace. |
|
||||
| `pods` | The total number of pods in a non-terminal state that can exist in the namespace. A pod is in a terminal state if `status.phase in (Failed, Succeeded)` is true. |
|
||||
| `replicationcontrollers` | The total number of replication controllers that can exist in the namespace. |
|
||||
| `resourcequotas` | The total number of [resource quotas](/docs/admin/admission-controllers/#resourcequota) that can exist in the namespace. |
|
||||
| `services` | The total number of services that can exist in the namespace. |
|
||||
| `services.loadbalancers` | The total number of services of type load balancer that can exist in the namespace. |
|
||||
| `services.nodeports` | The total number of services of type node port that can exist in the namespace. |
|
||||
| `secrets` | The total number of secrets that can exist in the namespace. |
|
||||
|
||||
For example, `pods` quota counts and enforces a maximum on the number of `pods`
|
||||
created in a single namespace.
|
||||
@@ -95,22 +95,22 @@ Resources specified on the quota outside of the allowed set results in a validat
|
||||
|
||||
| Scope | Description |
|
||||
| ----- | ----------- |
|
||||
| Terminating | Match pods where `spec.activeDeadlineSeconds >= 0` |
|
||||
| NotTerminating | Match pods where `spec.activeDeadlineSeconds is nil` |
|
||||
| BestEffort | Match pods that have best effort quality of service. |
|
||||
| NotBestEffort | Match pods that do not have best effort quality of service. |
|
||||
| `Terminating` | Match pods where `spec.activeDeadlineSeconds >= 0` |
|
||||
| `NotTerminating` | Match pods where `spec.activeDeadlineSeconds is nil` |
|
||||
| `BestEffort` | Match pods that have best effort quality of service. |
|
||||
| `NotBestEffort` | Match pods that do not have best effort quality of service. |
|
||||
|
||||
The `BestEffort` scope restricts a quota to tracking the following resources:
|
||||
* pods
|
||||
The `BestEffort` scope restricts a quota to tracking the following resource: `pods`
|
||||
|
||||
The `Terminating`, `NotTerminating`, and `NotBestEffort` scopes restrict a quota to tracking the following resources:
|
||||
* cpu
|
||||
* limits.cpu
|
||||
* limits.memory
|
||||
* memory
|
||||
* pods
|
||||
* requests.cpu
|
||||
* requests.memory
|
||||
|
||||
* `cpu`
|
||||
* `limits.cpu`
|
||||
* `limits.memory`
|
||||
* `memory`
|
||||
* `pods`
|
||||
* `requests.cpu`
|
||||
* `requests.memory`
|
||||
|
||||
## Requests vs Limits
|
||||
|
||||
|
||||
Reference in New Issue
Block a user