Resource allocation to pods in KubernetesAllocate or Limit resource for pods in Kubernetes?Allow only one pod of a type on a node in KubernetesAllocate or Limit resource for pods in Kubernetes?Restart pods when configmap updates in Kubernetes?Kubernetes pod distribution amongst nodesPod Resources MonitoringKubernetes cpu requests/limits in heterogeneous clusterkubernetes scheduling for expensive resourceswhat does kubernetes scheduler capacity check do or cover?How to calculate available free resources in a kubernetes nodeResource Allocation in Kubernetes: How are pods scheduled?
How do rulers get rich from war?
What are the end bytes of *.docx file format
Integrability of log of distance function
Is a global DNS record a security risk for phpMyAdmin?
Why was Java 8 left out from Debian Buster?
Cemented carbide swords - worth it?
Is there an in-universe reason Harry says this or is this simply a Rowling mistake?
What are sources for Magic Items that are not adventure-specific?
Debussy as term for bathroom?
Flying pigs arrive
Removing rows containing NA in every column
Audire, with accusative or dative?
What was the deeper meaning of Hermione wanting the cloak?
Is Zack Morris's 'time stop' ability in "Saved By the Bell" a supernatural ability?
All numbers in a 5x5 Minesweeper grid
Should I inform my future product owner that there is a good chance that a team member will leave the company soon?
Exam design: give maximum score per question or not?
Quick Kurodoko Puzzle: Threes and Triples
Weapon class firing logic in JavaScript
Is it safe to put a microwave in a walk-in closet?
Tips for remembering the order of parameters for ln?
Why would a fighter use the afterburner and air brakes at the same time?
I was cheated into a job and want to leave ASAP, what do I tell my interviewers?
siunitx redefines macros in pdf bookmarks
Resource allocation to pods in Kubernetes
Allocate or Limit resource for pods in Kubernetes?Allow only one pod of a type on a node in KubernetesAllocate or Limit resource for pods in Kubernetes?Restart pods when configmap updates in Kubernetes?Kubernetes pod distribution amongst nodesPod Resources MonitoringKubernetes cpu requests/limits in heterogeneous clusterkubernetes scheduling for expensive resourceswhat does kubernetes scheduler capacity check do or cover?How to calculate available free resources in a kubernetes nodeResource Allocation in Kubernetes: How are pods scheduled?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Assume that Kubernetes has scheduled two pods A and B in a node N. If the resource capacity of the Node N is (30 CPU, 70 Memory) and pod A requests (5 CPU, 8 memory) and pod B requestes (4 CPU, 10 memory), is it possible to share the resources among two pods in a way that we maintain the efficieny of the cluster and maximize the allocation of pods? How can I change the codes to achieve this? Assuming that each pod maintains 1 container.
kubernetes
add a comment
|
Assume that Kubernetes has scheduled two pods A and B in a node N. If the resource capacity of the Node N is (30 CPU, 70 Memory) and pod A requests (5 CPU, 8 memory) and pod B requestes (4 CPU, 10 memory), is it possible to share the resources among two pods in a way that we maintain the efficieny of the cluster and maximize the allocation of pods? How can I change the codes to achieve this? Assuming that each pod maintains 1 container.
kubernetes
1
What do you mean by "share the resources among two pods"? You can share a single node N if that's what you are asking; you will just need to configure the scheduler policy to configure Affinity/Anti-Affinity for close packing of your pods.
– Frank Yucheng Gu
Mar 28 at 14:45
add a comment
|
Assume that Kubernetes has scheduled two pods A and B in a node N. If the resource capacity of the Node N is (30 CPU, 70 Memory) and pod A requests (5 CPU, 8 memory) and pod B requestes (4 CPU, 10 memory), is it possible to share the resources among two pods in a way that we maintain the efficieny of the cluster and maximize the allocation of pods? How can I change the codes to achieve this? Assuming that each pod maintains 1 container.
kubernetes
Assume that Kubernetes has scheduled two pods A and B in a node N. If the resource capacity of the Node N is (30 CPU, 70 Memory) and pod A requests (5 CPU, 8 memory) and pod B requestes (4 CPU, 10 memory), is it possible to share the resources among two pods in a way that we maintain the efficieny of the cluster and maximize the allocation of pods? How can I change the codes to achieve this? Assuming that each pod maintains 1 container.
kubernetes
kubernetes
asked Mar 28 at 14:13
HamiBUHamiBU
526 bronze badges
526 bronze badges
1
What do you mean by "share the resources among two pods"? You can share a single node N if that's what you are asking; you will just need to configure the scheduler policy to configure Affinity/Anti-Affinity for close packing of your pods.
– Frank Yucheng Gu
Mar 28 at 14:45
add a comment
|
1
What do you mean by "share the resources among two pods"? You can share a single node N if that's what you are asking; you will just need to configure the scheduler policy to configure Affinity/Anti-Affinity for close packing of your pods.
– Frank Yucheng Gu
Mar 28 at 14:45
1
1
What do you mean by "share the resources among two pods"? You can share a single node N if that's what you are asking; you will just need to configure the scheduler policy to configure Affinity/Anti-Affinity for close packing of your pods.
– Frank Yucheng Gu
Mar 28 at 14:45
What do you mean by "share the resources among two pods"? You can share a single node N if that's what you are asking; you will just need to configure the scheduler policy to configure Affinity/Anti-Affinity for close packing of your pods.
– Frank Yucheng Gu
Mar 28 at 14:45
add a comment
|
1 Answer
1
active
oldest
votes
Kubernetes already does that.
Resource Requests are soft reservations, that means, the scheduler will consider it as a requirement when placing the pod in the node, it will allocate the resource to a POD but won't reserve the resources to be used exclusively by the pod that requested it.
If the POD request 1Gb of memory and consumed only 500Mb, other pods will be able to consume the remainder.
The main issue is when other PODs does not set limits, this will prevent the scheduler of controlling the load properly and other running pods might affect the pod. Other issue is when Limits are set too high and when being consumed will reach the node capacity.
To have a proper balance and efficiency, requests and limits should be set appropriately and prevent over-commitment.
This other SO shows a nice example of it: Allocate or Limit resource for pods in Kubernetes?
Thanks for your response. If we assume that pod have not set resource limits, how can I indicate that the whole resources in the cluster will be divides fairly among those two pods. Actually, I would like to allocate all the resources only to those two pods.
– HamiBU
Mar 28 at 15:05
If you don't set limits, some pods will consume more resources than others,without limits there is no guarantee that the resources will be split fairly. You can add policies to restrict pod creation without limits. In case you need more resources to the pods, instead of letting the pod consume too much resource. you setup auto scale to add more replicas of it (if the application can split the processing). Other option instead of adding replicas, you deploy more pods with lower priority, when higher priority pods need more resources, other with lower priority get evicted from nodes.
– Diego Mendes
Apr 1 at 10:13
add a comment
|
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55399744%2fresource-allocation-to-pods-in-kubernetes%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Kubernetes already does that.
Resource Requests are soft reservations, that means, the scheduler will consider it as a requirement when placing the pod in the node, it will allocate the resource to a POD but won't reserve the resources to be used exclusively by the pod that requested it.
If the POD request 1Gb of memory and consumed only 500Mb, other pods will be able to consume the remainder.
The main issue is when other PODs does not set limits, this will prevent the scheduler of controlling the load properly and other running pods might affect the pod. Other issue is when Limits are set too high and when being consumed will reach the node capacity.
To have a proper balance and efficiency, requests and limits should be set appropriately and prevent over-commitment.
This other SO shows a nice example of it: Allocate or Limit resource for pods in Kubernetes?
Thanks for your response. If we assume that pod have not set resource limits, how can I indicate that the whole resources in the cluster will be divides fairly among those two pods. Actually, I would like to allocate all the resources only to those two pods.
– HamiBU
Mar 28 at 15:05
If you don't set limits, some pods will consume more resources than others,without limits there is no guarantee that the resources will be split fairly. You can add policies to restrict pod creation without limits. In case you need more resources to the pods, instead of letting the pod consume too much resource. you setup auto scale to add more replicas of it (if the application can split the processing). Other option instead of adding replicas, you deploy more pods with lower priority, when higher priority pods need more resources, other with lower priority get evicted from nodes.
– Diego Mendes
Apr 1 at 10:13
add a comment
|
Kubernetes already does that.
Resource Requests are soft reservations, that means, the scheduler will consider it as a requirement when placing the pod in the node, it will allocate the resource to a POD but won't reserve the resources to be used exclusively by the pod that requested it.
If the POD request 1Gb of memory and consumed only 500Mb, other pods will be able to consume the remainder.
The main issue is when other PODs does not set limits, this will prevent the scheduler of controlling the load properly and other running pods might affect the pod. Other issue is when Limits are set too high and when being consumed will reach the node capacity.
To have a proper balance and efficiency, requests and limits should be set appropriately and prevent over-commitment.
This other SO shows a nice example of it: Allocate or Limit resource for pods in Kubernetes?
Thanks for your response. If we assume that pod have not set resource limits, how can I indicate that the whole resources in the cluster will be divides fairly among those two pods. Actually, I would like to allocate all the resources only to those two pods.
– HamiBU
Mar 28 at 15:05
If you don't set limits, some pods will consume more resources than others,without limits there is no guarantee that the resources will be split fairly. You can add policies to restrict pod creation without limits. In case you need more resources to the pods, instead of letting the pod consume too much resource. you setup auto scale to add more replicas of it (if the application can split the processing). Other option instead of adding replicas, you deploy more pods with lower priority, when higher priority pods need more resources, other with lower priority get evicted from nodes.
– Diego Mendes
Apr 1 at 10:13
add a comment
|
Kubernetes already does that.
Resource Requests are soft reservations, that means, the scheduler will consider it as a requirement when placing the pod in the node, it will allocate the resource to a POD but won't reserve the resources to be used exclusively by the pod that requested it.
If the POD request 1Gb of memory and consumed only 500Mb, other pods will be able to consume the remainder.
The main issue is when other PODs does not set limits, this will prevent the scheduler of controlling the load properly and other running pods might affect the pod. Other issue is when Limits are set too high and when being consumed will reach the node capacity.
To have a proper balance and efficiency, requests and limits should be set appropriately and prevent over-commitment.
This other SO shows a nice example of it: Allocate or Limit resource for pods in Kubernetes?
Kubernetes already does that.
Resource Requests are soft reservations, that means, the scheduler will consider it as a requirement when placing the pod in the node, it will allocate the resource to a POD but won't reserve the resources to be used exclusively by the pod that requested it.
If the POD request 1Gb of memory and consumed only 500Mb, other pods will be able to consume the remainder.
The main issue is when other PODs does not set limits, this will prevent the scheduler of controlling the load properly and other running pods might affect the pod. Other issue is when Limits are set too high and when being consumed will reach the node capacity.
To have a proper balance and efficiency, requests and limits should be set appropriately and prevent over-commitment.
This other SO shows a nice example of it: Allocate or Limit resource for pods in Kubernetes?
answered Mar 28 at 14:43
Diego MendesDiego Mendes
6,5021 gold badge20 silver badges29 bronze badges
6,5021 gold badge20 silver badges29 bronze badges
Thanks for your response. If we assume that pod have not set resource limits, how can I indicate that the whole resources in the cluster will be divides fairly among those two pods. Actually, I would like to allocate all the resources only to those two pods.
– HamiBU
Mar 28 at 15:05
If you don't set limits, some pods will consume more resources than others,without limits there is no guarantee that the resources will be split fairly. You can add policies to restrict pod creation without limits. In case you need more resources to the pods, instead of letting the pod consume too much resource. you setup auto scale to add more replicas of it (if the application can split the processing). Other option instead of adding replicas, you deploy more pods with lower priority, when higher priority pods need more resources, other with lower priority get evicted from nodes.
– Diego Mendes
Apr 1 at 10:13
add a comment
|
Thanks for your response. If we assume that pod have not set resource limits, how can I indicate that the whole resources in the cluster will be divides fairly among those two pods. Actually, I would like to allocate all the resources only to those two pods.
– HamiBU
Mar 28 at 15:05
If you don't set limits, some pods will consume more resources than others,without limits there is no guarantee that the resources will be split fairly. You can add policies to restrict pod creation without limits. In case you need more resources to the pods, instead of letting the pod consume too much resource. you setup auto scale to add more replicas of it (if the application can split the processing). Other option instead of adding replicas, you deploy more pods with lower priority, when higher priority pods need more resources, other with lower priority get evicted from nodes.
– Diego Mendes
Apr 1 at 10:13
Thanks for your response. If we assume that pod have not set resource limits, how can I indicate that the whole resources in the cluster will be divides fairly among those two pods. Actually, I would like to allocate all the resources only to those two pods.
– HamiBU
Mar 28 at 15:05
Thanks for your response. If we assume that pod have not set resource limits, how can I indicate that the whole resources in the cluster will be divides fairly among those two pods. Actually, I would like to allocate all the resources only to those two pods.
– HamiBU
Mar 28 at 15:05
If you don't set limits, some pods will consume more resources than others,without limits there is no guarantee that the resources will be split fairly. You can add policies to restrict pod creation without limits. In case you need more resources to the pods, instead of letting the pod consume too much resource. you setup auto scale to add more replicas of it (if the application can split the processing). Other option instead of adding replicas, you deploy more pods with lower priority, when higher priority pods need more resources, other with lower priority get evicted from nodes.
– Diego Mendes
Apr 1 at 10:13
If you don't set limits, some pods will consume more resources than others,without limits there is no guarantee that the resources will be split fairly. You can add policies to restrict pod creation without limits. In case you need more resources to the pods, instead of letting the pod consume too much resource. you setup auto scale to add more replicas of it (if the application can split the processing). Other option instead of adding replicas, you deploy more pods with lower priority, when higher priority pods need more resources, other with lower priority get evicted from nodes.
– Diego Mendes
Apr 1 at 10:13
add a comment
|
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55399744%2fresource-allocation-to-pods-in-kubernetes%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
What do you mean by "share the resources among two pods"? You can share a single node N if that's what you are asking; you will just need to configure the scheduler policy to configure Affinity/Anti-Affinity for close packing of your pods.
– Frank Yucheng Gu
Mar 28 at 14:45