Must specify limits.cpu,limits.memory,requests.cpu,requests.memory

Solution Verified - Updated -

Issue

  • How to specify limits.cpu,limits.memory,requests.cpu,requests.memory for builds.
  • When applying resourcequota on project level builds fails with below error :
Error creating: pods "test-php-1-build" is forbidden: Failed quota: ludo-quota: must specify limits.cpu,limits.memory,requests.cpu,requests.memory
23s        23s         1         test-php-1   Build                 Warning   HandleBuildError   {build-controller }   Build has error: failed to create build pod: pods "test-php-1-build" is forbidden: Failed quota: ludo-quota: must specify limits.cpu,limits.memory,requests.cpu,requests.memory
  • Replicaset failed to start the POD(s) with the condition:
status:
  conditions:
  - lastTransitionTime: "2021-11-24T04:49:53Z"
    message: 'pods "httpd-5bc7bcb454-bbkj4" is forbidden: failed quota: compute-resources: must specify limits.cpu,limits.memory'
    reason: FailedCreate
    status: "True"
    type: ReplicaFailure

Environment

  • OpenShift Container Platform (OCP)
    • 3.x
    • 4.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content