title: Kubernetes pod memory usage breakdown
body: <p>I'm trying to get a breakdown of the memory usage of my pods running on Kubernetes. I can see the pod's memory usage through <code>kubectl top pod</code> but what I need is a total breakdown of where the memory is used.</p>
  
  <p>My container might download or write new files to disk, so I'd like to see at a certain moment how much of the used memory is used for each file and how much is used by software running.
  currently, there's no real disk but just the TempFS, so that means every file is consuming the allocated memory resources, that is okay as long as I can inspect and know how much memory is where.</p>
  
  <p>Couldn't find anything like that, it seems that <code>cAdvisor</code> helps to get memory statics but it just uses <code>docker/cgroups</code> which doesn't give a breakdown as I described.</p>