Pod memory usage

Cluster information:

Kubernetes version: 1.17.7
Cloud being used: Azure
Host OS: Ubuntu 16.04.6 LTS

Hello. Running "kubectl top pod -n ". However, I am unable to match the output of memory usage from that command to the processes which I see on the pod. For example, we have a pod hosting a database. kubectl top pod shows this pod using 25 GB of memory, but when I exec into the pod and look at the processes using “top” I only see maybe 12 GB of memory. Is there some significant overhead? Within the pod yaml, there is no definition of resource limits, but there is a definition of resource request which is 30 GB memory. Thanks.

1 Like

Hi, @JTorma
~$ kubectl top pod -n
Error: flag needs an argument: ‘n’ in -n

can you please elaborate a bit more on the usage of -n?

thanks, regards, Yermek

The ‘-n’ argument accepts the namespace for which the command is used.

1 Like