You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: content/en/docs/concepts/policy/resource-quotas.md
+180
Original file line number
Diff line number
Diff line change
@@ -228,6 +228,7 @@ Resources specified on the quota outside of the allowed set results in a validat
228
228
|`NotBestEffort`| Match pods that do not have best effort quality of service. |
229
229
|`PriorityClass`| Match pods that references the specified [priority class](/docs/concepts/scheduling-eviction/pod-priority-preemption). |
230
230
|`CrossNamespacePodAffinity`| Match pods that have cross-namespace pod [(anti)affinity terms](/docs/concepts/scheduling-eviction/assign-pod-node). |
231
+
|`VolumeAttributesClass`| Match persistentvolumeclaims that references the specified [volume attributes class](/docs/concepts/storage/volume-attributes-classes). |
231
232
232
233
The `BestEffort` scope restricts a quota to tracking the following resource:
233
234
@@ -459,6 +460,185 @@ With the above configuration, pods can use `namespaces` and `namespaceSelector`
459
460
if the namespace where they are created have a resource quota object with
460
461
`CrossNamespacePodAffinity`scope and a hard limit greater than or equal to the number of pods using those fields.
PersistentVolumeClaims can be created with a specific [volume attributes class](/docs/concepts/storage/volume-attributes-classes/), and might be modified after creation. You can control a PVC's consumption of storage resources based on the associated volume attributes classes, by using the `scopeSelector` field in the quota spec.
468
+
469
+
The PVC references the associated volume attributes class by the following fields:
Verify that "Used" stats for "silver" volume attributes class quota, `pvcs-silver` has changed, `pvcs-copper` is unchanged, and `pvcs-gold` might be unchanged or released, which depends on the PVC's status.
582
+
```shell
583
+
kubectl describe quota
584
+
```
585
+
586
+
```
587
+
Name: pvcs-gold
588
+
Namespace: default
589
+
Resource Used Hard
590
+
-------- ---- ----
591
+
persistentvolumeclaims 1 10
592
+
requests.storage 2Gi 10Gi
593
+
594
+
595
+
Name: pvcs-silver
596
+
Namespace: default
597
+
Resource Used Hard
598
+
-------- ---- ----
599
+
persistentvolumeclaims 1 10
600
+
requests.storage 2Gi 20Gi
601
+
602
+
603
+
Name: pvcs-copper
604
+
Namespace: default
605
+
Resource Used Hard
606
+
-------- ---- ----
607
+
persistentvolumeclaims 0 10
608
+
requests.storage 0 30Gi
609
+
```
610
+
611
+
Wait a moment for the operation to complete, then verify the quota again.
612
+
613
+
```shell
614
+
kubectl describe quota
615
+
```
616
+
617
+
```
618
+
Name: pvcs-gold
619
+
Namespace: default
620
+
Resource Used Hard
621
+
-------- ---- ----
622
+
persistentvolumeclaims 0 10
623
+
requests.storage 0 10Gi
624
+
625
+
626
+
Name: pvcs-silver
627
+
Namespace: default
628
+
Resource Used Hard
629
+
-------- ---- ----
630
+
persistentvolumeclaims 1 10
631
+
requests.storage 2Gi 20Gi
632
+
633
+
634
+
Name: pvcs-copper
635
+
Namespace: default
636
+
Resource Used Hard
637
+
-------- ---- ----
638
+
persistentvolumeclaims 0 10
639
+
requests.storage 0 30Gi
640
+
```
641
+
462
642
## Requests compared to Limits {#requests-vs-limits}
463
643
464
644
When allocating compute resources, each container may specify a request and a limit value for either CPU or memory.
0 commit comments