Home > Storage > Data Storage Essentials > Storage Automation Software > Persistent Storage for Containerized Applications on Kubernetes with PowerMax SAN Storage > Quota per namespace
Kubernetes allows defining resource quotas to limit the use of compute and storage resources of the cluster. The quotas are given per namespace. The storage resource quotas can limit the total amount of storage to be used and the number of PersistentVolumeClaim requests per namespace.
You can also scope the quota to a particular Storage Class, as in the following example:
cat <<EOF > storage-resources.yaml
apiVersion: v1
kind: ResourceQuota
metadata:
name: storage-resources
spec:
hard:
powermax.storageclass.storage.k8s.io/requests.storage: "500Gi"
powermax.storageclass.storage.k8s.io/persistentvolumeclaims: 10000
EOF
kubectl create -f ./storage-resources.yaml --namespace=test
Check the quotas definitions for a namespace with:
kubectl describe quota storage-resources --namespace=test
Name: storage-resources
Namespace: test
Resource Used Hard
-------- ---- ----
powermax.storageclass.storage.k8s.io/persistentvolumeclaims 2 10k
powermax.storageclass.storage.k8s.io/requests.storage 16Gi 500Gi