Kubernetes memory, explained
See what is really consuming Pod memory.
Kubernetes tells you memory is high. KubeMemLens separates the observed charge into application memory, file cache, shmem and residual signals so you can investigate why.
Get KubeMemLens · Tested on AWS EKS · Linux and cgroup v2
01 · Composition
A single memory number is not a diagnosis.
kubectl top can tell you that memory is high. It cannot tell you whether the charge comes from application memory, filesystem cache, tmpfs, pressure or another cgroup signal.
Repository sample · cache-heavy
- Anonymous memory
- 1.20 GiB
- File cache
- 2.51 GiB
- Shmem / tmpfs
- 90.00 MiB
- Residual / other
- 307.20 MiB
02 · Workflow
From signal to evidence.
Stay in the terminal and move through the investigation with read-only commands. KubeMemLens reports evidence and caveats; it does not mutate workloads.
Explore the CLI- 01
Find
kubectl memlens top pods -A --sort-by cacheBring the Pods with the strongest memory signals to the top.
- 02
Explain
kubectl memlens explain pod api-123 -n productionInspect composition, limits, pressure and the evidence behind the diagnosis.
- 03
Preserve
kubectl memlens capture -n production --pod api-123 --include-history -o incident.jsonWrite a redacted incident capture that you can review and compare.
03 · Evidence
Tested on AWS EKS.
Memory inspection, capture and replay, access isolation, recovery and cleanup were exercised on AWS EKS. Use KubeMemLens in your workflow and tell us what you find.
Exact supported and unsupported combinations are maintained in the compatibility contract.
Start here
Start investigating memory.
Install KubeMemLens, open the terminal dashboard and inspect your workloads.Send feedback or report a bug on GitHub.
helm upgrade --install kube-memlens \
oci://ghcr.io/danushkastanley/charts/kube-memlens \
--version 1.0.0 \
--namespace kube-memlens \
--create-namespace \
--set-string image.repository=ghcr.io/danushkastanley/kube-memlens \
--set-string image.digest=sha256:a14e92d22823a207853256572a572127f10e0f03281e9f381bca2b41d85cd795