Michael
Michael

Reputation: 1839

Openshift online deployment error when adding volume to pod

I have pod and I am attempting to attach a persistent mysql storage to it. Then deployment starts and after waiting a while it fails with the following error on the log:

--> Scaling up php-4 from 0 to 1, scaling down php-1 from 1 to 0 (keep 1 pods available, don't exceed 2 pods)
    Scaling php-4 up to 1
-->  FailedCreate: php-4 Error creating: pods "php-4-" is forbidden: exceeded quota: compute-resources, requested: limits.cpu=1,limits.memory=512Mi, used: limits.cpu=2,limits.memory=1Gi, limited: limits.cpu=2,limits.memory=1Gi
error: timed out waiting for "php-4" to be synced

If this is caused by limits, how can I deploy a new version of a pod with new config if I can only use one at a time? Is there something that I am missing?

Upvotes: 0

Views: 1329

Answers (1)

Graham Dumpleton
Graham Dumpleton

Reputation: 58523

If you are at the limit on resources a rolling deployment will not work as you cannot create a new pod as that will exceed resource limits. You need to change the deployment strategy in the deployment config from Rolling to Recreate if you want to run at resource limits.

Upvotes: 1

Related Questions