<p>We are consuming kubelet <code>/stats/summary</code> endpoint.</p>
<p>We noticed that the metrics returned are not always present and might be missing in some scenarios.</p>
<p>In particular we are interested in <code>Rootfs.UsedBytes</code> that in missing in <code>minikube</code> but present in other environments.</p>
<p>Command to retrieve <code>/stats/summary</code> from kubelet, notice that the port can vary in different k8s flavours</p>
<pre><code>token=$(k get secrets &lt;service-account-token-with-enough-privileges&gt; -o json \
| jq .data.token -r | base64 -d -)

k run curler --rm -i --restart=Never --image nginx -- \
curl -X GET https://&lt;nodeIP&gt;:10250/stats/summary --header &quot;Authorization: Bearer $token&quot; --insecure

</code></pre>
<pre><code>&quot;pods&quot;: [
{
...
   &quot;containers&quot;: [
   {
   ...
      &quot;rootfs&quot;: {
         ...
         &quot;usedBytes&quot;: 36864,
         ...
       }
</code></pre>
<ul>
<li>Why is that?</li>
<li>Is there a similar metric more reliable?</li>
<li>Can add anything in Minikube to enable that?</li>
</ul>
<p>EDIT:</p>
<blockquote>
<p>It is possible that the issue is related to --driver=docker option of minikube</p>
</blockquote>

GalloCedrone
<p>To clarify I am posing community wiki answer.</p>
<p>The problem here was resolved by changing driver to <em><strong>Hyperkit</strong></em>.</p>
<p>According to the <a href="https://minikube.sigs.k8s.io/docs/drivers/hyperkit/" rel="nofollow noreferrer">documentation</a>:</p>
<blockquote>
<p><a href="https://github.com/moby/hyperkit" rel="nofollow noreferrer">HyperKit</a>  is an open-source hypervisor for macOS hypervisor, optimized for lightweight virtual machines and container deployment.</p>
</blockquote>
<p>There are two ways to install HyperKit (if you have installed Docker for Desktop, you don't need to do anything - you already have HyperKit):</p>
<ul>
<li>you can <a href="https://github.com/moby/hyperkit" rel="nofollow noreferrer">install HyperKit from GitHub</a></li>
<li>if you have <a href="https://brew.sh/" rel="nofollow noreferrer">Brew Package Manager</a> - run the following command:</li>
</ul>
<pre class="lang-sh prettyprint-override"><code>brew install hyperkit
</code></pre>
<p>See also <a href="https://github.com/moby/hyperkit" rel="nofollow noreferrer">this reference</a>.</p>
