"Exceeded Quota"

ARTIFACTORY: How To Fix "Failed Quota" and "Exceeded Quota" While Deploying Artifactory-HA in Helm

AuthorFullName__c
James Daniel
articleNumber
000006091
FirstPublishedDate
2024-05-05T07:48:47Z
lastModifiedDate
2025-05-21
VersionNumber
1
We can see that the Artifactory statefulset is still throwing an error:

Artifactory StatefuSet:
Events:
  Type     Reason        Age                From                    Message
  ----     ------        ----               ----                    -------
   Warning  FailedCreate  3m9s (x2 over 3m9s)  statefulset-controller  create Pod artifactory-ha-artifactory-ha-primary-0 in StatefulSet artifactory-ha-artifactory-ha-primary failed error: pods "artifactory-ha-artifactory-ha-primary-0" is forbidden: exceeded quota: resource-quotas, requested: limits.cpu=7,limits.memory=7Gi,pods=1, used: limits.cpu=500m,limits.memory=512Mi,pods=2, limited: limits.cpu=4,limits.memory=6Gi,pods=2

Here we're seeing a different error: "Exceeded Quota". We can see that the requested limits are higher than the hard ("limited") limits. If the environment allows, we can simply edit the resourceQuota to increase the hard limits. If not, we may be able to reduce the request limits for the cluster services. We may also need to adjust replicas as well.

To adjust the resourceQuota, let's run the following command and edit as necessary and redeploy the cluster:
kubectl edit resourcequota <resource quota name>

To adjust the resource allocations of individual services, we can use the sizing yaml files in the Helm Chart or specify the resource limitations to meet the limits of the resourceQuota. As the machine I'm working on has enough resources, I'll increase the hard limits in the resourceQuota as shown below:
Name:            resource-quotas
Namespace:       resources
Resource         Used    Hard
--------         ----    ----
limits.cpu       7500m   8
limits.memory    7680Mi  10Gi
pods             3       5
requests.cpu     1600m   7
requests.memory  2136Mi  8Gi

After making these adjustments and redeploying the cluster we see the Artifactory pods initializing.
NAME                                      READY   STATUS            RESTARTS        AGE
artifactory-ha-postgresql-0               1/1     Running           0               5h34m
artifactory-ha-nginx-77d44487c4-xhz6z     0/1     Running           13 (3m2s ago)   3h19m
artifactory-ha-artifactory-ha-primary-0   0/7     PodInitializing   0               6s

In this article, we reviewed how to overcome errors in the StatefulSets and ReplicatSet related to resouceQuotas configured in the namespace that prevented the creation of pods in the Artifactory-HA Helm installation. I hope this guide helped understand how this error and how resourceQuotas can impact the health of the Artifactory cluster.