<p>I have a service on my kubernetes cluster that generates massive assets to my machine's hard disk. Some of that information could also be served statically by a different service in my system. The save location is mapped to an actual folder on my disk.</p>
<p>I already found that I can see some information about my &quot;ephemral&quot; storage capacity and allocatbility through <code>kubectl describe node</code> but the data doesn't align with what I see when I run <code>df -h</code> on my machine's terminal. on the node, I can see that I could allocate 147GB and on my terminal I can see that I could only allocate 98GB (this means we probably have some reserved space by Kubernetes in our deployments). I would like my metrics to reflect the actual state of the hard drive.</p>
<p>My Question:<br />
How do I check through Kubernetes's python package what's the status of the storage on my machine <em><strong>without mounting my root path into the relevant container</strong></em>? Is there an API to the metrics service that shows me the status of my machine's actual storage? I tried looking at the <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/README.md" rel="nofollow noreferrer">Python API</a> and couldn't find it. What am I missing?</p>

Oren_C
<p>Kubernetes does not track overall storage available. It only knows things about emptyDir volumes and the filesystem backing those. If you're using a hostPath mount (which it sounds like you are), that is outside of Kube's view of the world. You can use something like node_exporter to gather those statistics yourself.</p>
