Container Resource Allocation
When specify the resource request
for containers in a Pod, the kube-scheduler uses this information to decide which node to place the Pod on.
When specify a resource limit
for a container, the kubelet enforces those limits so that the running container is not allowed to use more of that resource than the limit prescribed.
-
After logging into OmniDeq, click on the Project where you want to manage the resource allocations and click on
Cruize
. -
Click on blueprint version count on blueprint card. After clicking to count, blueprint versions page will be displayed which contains list of blueprint versions.
-
Click on View configurations kebab menu option or click on blueprint version name then of blueprint version to view blueprint configurations. Go to Deployments tab and click on
Edit deployment definition
from Action column of any deployment. -
Then deployment definition page will be opened, now go to
Containers
tab. Select container and then go toResource Allocation
tab as shown in the below image.
Add Resource Allocation
-
By default resource requests and limits are not applied as shown in the image below. In order to enable resource allocations add resource requests and limits.
-
In order to add resource requests and limits, click on
update
button as shown in the image below.
Resource Limits
- CPU(M) : Provide value greater than 100
- Memory(Mi) : Provide value greater than 64
Resource Requests
-
CPU(M)
- Provide value greater than 100
- Provide value less than or equal to CPU limit
-
Memory(Mi)
- Provide value greater than 64
- Provide value less than or equal to memory limit
-
Provide values and click on
Save Changes
button
Enabling Resource Limits
-
Click on
Enabling Resource Limits
button which will open up confirmation popup to ask confirmation as shown below and click onYes
button to enable resource limits.Note: Before enabling resource limits, make sure that the allocated resources are available on the cluster.
Disabling Resource Limits
-
For disabling resource limits click on
Enabling Resource Limits
button, which will open up confirmation popup to ask confirmation as shown below. Click onYes
button to disable resource limits._Note: Disabling resource limits may lead to this container consuming the entire memory and CPU of the underlying node. This may result in resource exhaustion on the node and lead to node crash.
Note:
1. CPU unit: m = millicpu
2. Memory unit: Mi = MiB = Mebibyte.