CloudsArk
Security SCC RBAC and Projects Openshift

OpenShift Project Resourcequota

Learn practical openshift project resourcequota with oc commands, OpenShift manifests, verification steps, common mistakes, and production-focused guidance.

OpenShift Project Resourcequota

Introduction

ResourceQuota and LimitRange protect shared OpenShift projects from uncontrolled consumption. They also explain many pod admission failures when requests or limits are missing.

Why This Matters

OpenShift adds security defaults such as SCCs, project isolation, and integrated OAuth/RBAC behavior. These protections are useful only when permissions are granted narrowly and verified.

Step-by-Step Configuration

oc get resourcequota -n app
oc describe resourcequota compute-quota -n app
oc get limitrange -n app
oc describe limitrange default-limits -n app

Example output:

NAME            AGE   REQUEST                                  LIMIT
compute-quota   3d    requests.cpu: 800m/2, requests.memory: 1Gi/4Gi

Verification

oc describe resourcequota compute-quota -n app
oc describe limitrange default-limits -n app
oc get events -n app --sort-by=.lastTimestamp

Security Best Practices

Grant the smallest role or SCC that works, prefer service-account-specific access, keep secrets out of Git, and verify permissions with oc auth can-i.

Common Mistakes

  • Adding quotas without communicating default limits.
  • Debugging Pending pods without checking quota events.
  • Setting CPU limits globally without considering throttling.

Troubleshooting

Compare the failing user or service account with the role binding, SCC admission error, project quota, or OAuth status shown in OpenShift events.

Summary

OpenShift Project Resourcequota is safest when permissions are explicit, namespace-scoped where possible, and validated from the same identity that runs the workload.