How much RAM can my Kubernetes pod grow to?

Use kubectl top command

kubectl top pod id-for-the-pod

kubectl top --help

Display Resource (CPU/Memory/Storage) usage.

The top command allows you to see the resource consumption for nodes or pods.

This command requires Heapster to be correctly configured and working on the server.

Available Commands: node Display Resource (CPU/Memory/Storage) usage of nodes pod Display Resource (CPU/Memory/Storage) usage of pods

Usage: kubectl top [flags] [options]


The edit in the question asks how to see the max memory limit for an existing pod. This shold do:

kubectl -n <namespace> exec <pod-name> cat /sys/fs/cgroup/memory/memory.limit_in_bytes

Reference: https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt

With QoS class of BestEffort (seen in the output from kubectl -n <namespace> get pod <pod-name> -o yaml or kubectl -n <namespace> describe pod <pod-name>), there may be no limits (other than the available memory on the node where the pod is running) so the value returned can be a large number (e.g. 9223372036854771712 - see here for an explanation).


You can use

kubectl top pod POD_NAME

It will show you memory and CPU usage.

[Edit: See comment for more]