@@ -463,7 +463,7 @@ that file but the kubelet does not categorize the space as in use.
463
463
{{% /tab %}}
464
464
{{% tab name="Filesystem project quota" %}}
465
465
466
- {{< feature-state for_k8s_version="v1.15" state="alpha " >}}
466
+ {{< feature-state feature_gate_name="LocalStorageCapacityIsolationFSQuotaMonitoring " >}}
467
467
468
468
Project quotas are an operating-system level feature for managing
469
469
storage use on filesystems. With Kubernetes, you can enable project
@@ -489,13 +489,21 @@ If a file is created and deleted, but has an open file descriptor,
489
489
it continues to consume space. Quota tracking records that space accurately
490
490
whereas directory scans overlook the storage used by deleted files.
491
491
492
+ To use quotas to track a pod's resource usage, the pod must be in
493
+ a user namespace. Within user namespaces, the kernel restricts changes
494
+ to projectIDs on the filesystem, ensuring the reliability of storage
495
+ metrics calculated by quotas.
496
+
492
497
If you want to use project quotas, you should :
493
498
494
499
* Enable the `LocalStorageCapacityIsolationFSQuotaMonitoring=true`
495
500
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
496
501
using the `featureGates` field in the
497
- [kubelet configuration](/docs/reference/config-api/kubelet-config.v1beta1/)
498
- or the `--feature-gates` command line flag.
502
+ [kubelet configuration](/docs/reference/config-api/kubelet-config.v1beta1/).
503
+
504
+ * Ensure the `UserNamespacesSupport`
505
+ [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
506
+ is enabled, and that the kernel, CRI implementation and OCI runtime support user namespaces.
499
507
500
508
* Ensure that the root filesystem (or optional runtime filesystem)
501
509
has project quotas enabled. All XFS filesystems support project quotas.
@@ -511,6 +519,13 @@ If you want to use project quotas, you should:
511
519
mounted with project quotas enabled. For both XFS and ext4fs, the
512
520
mount option is named `prjquota`.
513
521
522
+
523
+ If you don't want to use project quotas, you should :
524
+
525
+ * Disable the `LocalStorageCapacityIsolationFSQuotaMonitoring`
526
+ [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
527
+ using the `featureGates` field in the
528
+ [kubelet configuration](/docs/reference/config-api/kubelet-config.v1beta1/).
514
529
{{% /tab %}}
515
530
{{< /tabs >}}
516
531
0 commit comments