From 3f0f56f0f220be91e631c422e39767efdf0a9d1e Mon Sep 17 00:00:00 2001 From: Nir Rosenthal <32959392+nirroz93@users.noreply.github.com> Date: Fri, 18 Mar 2022 00:06:10 +0200 Subject: [PATCH 1/2] Changing note about limits without requests this is true for all limits (not only CPU and memory but also ephemeral storage) https://github.com/kubernetes/kubernetes/blob/4d08582d1fa21e1f5887e73380001ac827371553/pkg/apis/core/v1/defaults.go#L159 --- .../docs/concepts/configuration/manage-resources-containers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/concepts/configuration/manage-resources-containers.md b/content/en/docs/concepts/configuration/manage-resources-containers.md index 18f2fc5cb5..72d47f3d3e 100644 --- a/content/en/docs/concepts/configuration/manage-resources-containers.md +++ b/content/en/docs/concepts/configuration/manage-resources-containers.md @@ -49,7 +49,7 @@ runtimes can have different ways to implement the same restrictions. {{< note >}} If a container specifies its own memory limit, but does not specify a memory request, Kubernetes automatically assigns a memory request that matches the limit. Similarly, if a container specifies its own -CPU limit, but does not specify a CPU request, Kubernetes automatically assigns a CPU request that matches +CPU limit (or any other resource limit), but does not specify a CPU request, Kubernetes automatically assigns a CPU request that matches the limit. {{< /note >}} From 76e78444ef662f6369ad270e3dce44dfc8b844ec Mon Sep 17 00:00:00 2001 From: Nir Rosenthal <32959392+nirroz93@users.noreply.github.com> Date: Sat, 19 Mar 2022 17:39:59 +0200 Subject: [PATCH 2/2] per https://github.com/kubernetes/website/pull/32326#discussion_r830493057 --- .../concepts/configuration/manage-resources-containers.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/content/en/docs/concepts/configuration/manage-resources-containers.md b/content/en/docs/concepts/configuration/manage-resources-containers.md index 72d47f3d3e..49d86e4c4c 100644 --- a/content/en/docs/concepts/configuration/manage-resources-containers.md +++ b/content/en/docs/concepts/configuration/manage-resources-containers.md @@ -47,10 +47,9 @@ or by enforcement (the system prevents the container from ever exceeding the lim runtimes can have different ways to implement the same restrictions. {{< note >}} -If a container specifies its own memory limit, but does not specify a memory request, Kubernetes -automatically assigns a memory request that matches the limit. Similarly, if a container specifies its own -CPU limit (or any other resource limit), but does not specify a CPU request, Kubernetes automatically assigns a CPU request that matches -the limit. +If you specify a limit for a resource, but do not specify any request, and no admission-time +mechanism has applied a default request for that resource, then Kubernetes copies the limit +you specified and uses it as the requested value for the resource. {{< /note >}} ## Resource types