Category: Kubernetes

This blog is a continuation of previous blog series https://goglides.io/2020/03/03/limit-range-kubernetes/ Using LimitRange it is possible to enforce minimum and maximum size of storage resources that can be requested by each PersistentVolumeClaim in a namespace.

Apply the YAML file using: Describe the created object: Now let’s test the constraint working or not, first test lower limits (pvc-limit-lower.yaml) apply YAML, Since limitRange rule saying min storage should be 1Gi, so this PersistentVolumeClaim not satisfying this constraint and hence failed. Now try with higher limits (pvc-limit-higher.yaml) apply YAML, This one is also not satisfying the constraint and failed gracefully. Now test with PersistentVolumeClaim which satisfy the constraint (pvc-limit-matching-constraint.yaml) apply YAML, Describe object, You can see PersistentVolume is created, Written by

Related Articles