apiVersion: v1
kind: LimitRange
metadata:
  name: pvc-limit-range
  namespace: my-namespace
spec:
  limits:
  - type: PersistentVolumeClaim
    min:
      storage: 1Gi      # minimum storage request for any PVC in the namespace must be at least 1 GiB
    max:
      storage: 10Gi     # maximum storage request for any PVC in the namespace cannot exceed 10 GiB
    default:
      storage: 5Gi      # if a PVC does not specify a storage size, it will default to 5 GiB


# Creating a PVC: When a user creates a PVC in the specified namespace, Kubernetes will check the requested storage size against the limits defined in the LimitRange.

# Validation: If the requested size is below the minimum or above the maximum, the PVC creation will be rejected.

# Defaulting: If the user does not specify a storage size, the PVC will automatically be assigned the default size defined in the LimitRange.
