Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Explain why we can't dynamically update resource values on a running pod #473

Closed
wants to merge 4 commits into from

Conversation

geremyCohen
Copy link
Contributor

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Adding some explanation on why the user can't simply update the memory resources for the existing pod.
Copy link
Contributor

@buzzsurfr buzzsurfr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure whether we should reference the issue from kubernetes/kubernetes.

@@ -339,6 +339,10 @@ Watch the status of the Pod:

`OOMKilled` shows that the container was terminated because it ran out of memory.

To correct this, we'll need to re-create the pod with higher memory limits.

Although it may be instinctive to simply adjust the memory limit in the existing pod definition and re-apply it, https://github.com/kubernetes/kubernetes/issues/39060#issuecomment-268449812[Kubernetes does not currently support changing resource limits on running pods], so we'll need to first delete the existing pod, then recreate it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to reference the issue? Can we instead highlight that Kubernetes does not support in-place adjustments to pod resources?

If this will be fixed, then I can see tracking the issue. However, if it's not on the roadmap, then we should leave the issue out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just being verbose :) No need to include the link reference.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you fix and send a new commit?

@@ -359,7 +363,7 @@ Get more details about the resources allocated to the Pod:

=== Quality of service

Kubernetes opportunistically scavenge the difference between request and limit if they are not used by the Containers. This allows Kubernetes to oversubscribe nodes, which increases utilization, while at the same time maintaining resource guarantees for the containers that need guarantees.
Kubernetes opportunistically scavenges the difference between request and limit if they are not used by the Containers. This allows Kubernetes to oversubscribe nodes, which increases utilization, while at the same time maintaining resource guarantees for the containers that need guarantees.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good.

@dalbhanj
Copy link
Contributor

@geremyCohen

Can you please fix conflicts and resubmit PR?

@geremyCohen
Copy link
Contributor Author

@buzzsurfr new issue and PR available at #551 and #552

@geremyCohen geremyCohen mentioned this pull request Aug 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants