Rajiv
Rajiv

Reputation: 41

How to update limits.memory using command line in Openshift?

I would like to update or change memory limit to 90Gi in this spec using command line.

spec: hard: limits.cpu: 12500m limits.memory: 80Gi pods: "10" requests.cpu: 12500m requests.memory: 80Gi

The current steps are oc edit quota compute-resources, manually change the limit and save.

Upvotes: 1

Views: 3683

Answers (1)

Daein Park
Daein Park

Reputation: 4693

Try the following commands for your purpose.

For specific quota modification.

$ oc delete quota <name> && oc create quota <name> \
     --hard=cpu=12500m,memory=80Gi

For specific deploymentconfig which you can list using oc get dc.

$ oc set resources dc/<target deploymentconfig name> \
   --limits=cpu=12500m,memory=80Gi \
   --requests=cpu=12500m,memory=80Gi

Upvotes: 4

Related Questions