OpenShift - Resolve "exceeded quota"

If you are not familiar with the oc command, refer to OpenShift - Getting Started with the oc command.

  • Limits can be used to set the minimum amount of CPU and memory reserved or allocated for a container in a deployment and to also set the maximum amount of CPU and memory that can be used by the container in a deployment.
  • Qutoas can be used the set the minimum and maximum amount of CPU and memory that can be used by all of the containers / deployments / pods in a project / namespace, or on a group of projects / namespaces, or to a user account. Quotas can also set a limit on the maximum number of running persistent volume claims, pods, replication controllers, routes, secrets, services, et cetera in a project / namespace.

The oc create quota command can be used to create a quota. In this example, the quota would be limited to a specific project / namespace.

oc create quota default-quota --hard=pods=10,cpu=1,memory=1G,pods=2,secrets=1 --namespace <some namespace>


The oc create clusterresourcequota command can be used to create a quota for the entire cluster.

oc create clusterresourcequota onehundredpods --hard=pods=100


If you do something that exceeds the quota, something like this should be returned.

~]$ oc create --filename pod.yml
Error from server (Forbidden): pods "pod001" is forbidden: exceeded quota: default-quota, requested: pods=1, used: pods=10, limited: pods=5


Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee

Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter 669d9 in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   |