Question

What do the parentheses indicate in the following output from 'kubernetes describe node <node>' ?

Posted April 26, 2020 276 views
Kubernetes

Is this how much of a value has been consumed? If so, shouldn’t the memory request value be higher since its requested value is smaller?

Node: pool-majaaaaaa-aaaa
  Namespace                  Name                                                            CPU Requests  CPU Limits  Memory Requests  Memory Limits  AGE
  ---------                  ----                                                            ------------  ----------  ---------------  -------------  ---
  kube-system                coredns-84c79f5fb4-8f2g6                                        100m (10%)    0 (0%)      70Mi (4%)        170Mi (10%)    35d


1 comment
  • Thank you for linking to the documentation, but the doc and your explanation don’t actually help me with the question I asked. I could be being dense here, but I want to know what the (%4) and (%10) values are referring to. A specific answer, which the docs fail to provide, is what I am looking for.

    What does “70Mi (4%)” mean? What does “170Mi (10%)” mean? Does it mean that 4% of 70Mi are being used? If so, why is 10% of a larger 170Mi also appear to be used? It is confusing output to me.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
2 answers

Hello,

The output looks good actually. If a Kubernetes node where a Pod is running has enough resources available, a container could try to use more resources than its request for that resource specifies.

However, a container is not allowed to use more than its resource limit.

The bellow is an example from the official Kubernetes documentation:

If you set a memory request of 256 MiB for a container, and that container is in a Pod scheduled to a Node with 8GiB of memory and no other Pods, then the container can try to use more RAM.

If you set a memory limit of 4GiB for that Container, the kubelet (and container runtime) enforce the limit. The runtime prevents the container from using more than the configured resource limit. For example: when a process in the container tries to consume more than the limit of memory, the system kernel terminates the process that attempted the allocation, with an out of memory (OOM) error.

For more information on managing resources, you could take a look at the documentation here:

https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/

Regards,
Bobby

  • What does “70Mi (4%)” mean? What does “170Mi (10%)” mean? Does it mean that 4% of 70Mi are being used? If so, why is 10% of a larger 170Mi also appear to be used? It is confusing output to me.

I understood these to mean the total usage of the nodes allocateable memory. If you see (10%) that mean’s that pod is using 10% of the nodes allocatable memory for workloads.

Submit an Answer