The request resources is a configuration related to the quantity of memory and CPU minimal required to run the pod on a node. It is used for the OpenShift select available nodes to create the pods when it is escalated to many nodes for example.
The limits are related to the values used for the application itself. If the application tries to use more than the limit defined for memory it will die with an out of memory issue for example. The number of CPUs defined will be the quantity available to be used for the pod, in this way, if the quantity is too small for the process it will be very slow.
Following an example to update the resources of a pod/application.
- Memory limit: 3Gi
- Memory request: 2Gi
- CPU request: 1 CPU
- CPU limit: 2 CPUs
$oc set resources dc/myapp --limits=memory=3Gi,cpu=2 --requests=memory=2Gi,cpu=1
Note that this configuration is set up in the deploy config.
$oc edit dc/myapp
In the console, this information will be available in the deploy of the application as follows.