<p>I am getting the pod metrics through kubectl command</p>

<pre><code>➜  kubectl top pods
NAME                CPU(cores)   MEMORY(bytes)
api-6bd876fc8b-85dnx   72m          553Mi
ui-67b794cf8d-gcrg5    0m           1Mi
</code></pre>

<p>but I want to try through Java client <a href="https://github.com/kubernetes-client/java/" rel="nofollow noreferrer">https://github.com/kubernetes-client/java/</a></p>

<p>Is there any support to get the Metrics for Pods and Nodes through kubernetes-client ?</p>

geek
<p>as blue man said, it is now possible to get this metrics<br />
Java Solution</p>
<pre class="lang-java prettyprint-override"><code>PodMetricsList list = new Metrics(client).getPodMetrics(&quot;playground&quot;);

for(PodMetrics podMetrics:list.getItems()){
    for(ContainerMetrics containerMetrics:podMetrics.getContainers()){
                System.out.println(containerMetrics.getUsage());
    }
}
</code></pre>
