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
+181
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,186 @@ 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
+
583
+
```shell
584
+
kubectl describe quota
585
+
```
586
+
587
+
```
588
+
Name: pvcs-gold
589
+
Namespace: default
590
+
Resource Used Hard
591
+
-------- ---- ----
592
+
persistentvolumeclaims 1 10
593
+
requests.storage 2Gi 10Gi
594
+
595
+
596
+
Name: pvcs-silver
597
+
Namespace: default
598
+
Resource Used Hard
599
+
-------- ---- ----
600
+
persistentvolumeclaims 1 10
601
+
requests.storage 2Gi 20Gi
602
+
603
+
604
+
Name: pvcs-copper
605
+
Namespace: default
606
+
Resource Used Hard
607
+
-------- ---- ----
608
+
persistentvolumeclaims 0 10
609
+
requests.storage 0 30Gi
610
+
```
611
+
612
+
Wait a moment for the operation to complete, then verify the quota again.
613
+
614
+
```shell
615
+
kubectl describe quota
616
+
```
617
+
618
+
```
619
+
Name: pvcs-gold
620
+
Namespace: default
621
+
Resource Used Hard
622
+
-------- ---- ----
623
+
persistentvolumeclaims 0 10
624
+
requests.storage 0 10Gi
625
+
626
+
627
+
Name: pvcs-silver
628
+
Namespace: default
629
+
Resource Used Hard
630
+
-------- ---- ----
631
+
persistentvolumeclaims 1 10
632
+
requests.storage 2Gi 20Gi
633
+
634
+
635
+
Name: pvcs-copper
636
+
Namespace: default
637
+
Resource Used Hard
638
+
-------- ---- ----
639
+
persistentvolumeclaims 0 10
640
+
requests.storage 0 30Gi
641
+
```
642
+
462
643
## Requests compared to Limits {#requests-vs-limits}
463
644
464
645
When allocating compute resources, each container may specify a request and a limit value for either CPU or memory.
0 commit comments