<p>Is it possible to use <a href="https://github.com/kubernetes-client/python/tree/master/kubernetes/client/api" rel="nofollow noreferrer">kubernetes python client</a> library in order to get output similar to <code>kubectl describe nodes</code> ?</p>

l00p
<p><strong>Yes</strong>, you can use it to do the same task mostly you are doing with <strong>kubectl</strong>.</p>
<p><strong>kubectl</strong> itself is one type of client that you are using.</p>
<p><strong>Example</strong> :</p>
<pre><code>from kubernetes import client, config


def main():
    config.load_kube_config()

    api_instance = client.CoreV1Api()

    # Listing the cluster nodes
    node_list = api_instance.list_node()

    print(&quot;%s\t\t%s&quot; % (&quot;NAME&quot;, &quot;LABELS&quot;))


if __name__ == '__main__':
    main()
</code></pre>
<p>Example ref : <a href="https://github.com/kubernetes-client/python/blob/master/examples/node_labels.py" rel="nofollow noreferrer">https://github.com/kubernetes-client/python/blob/master/examples/node_labels.py</a></p>
<p><strong>EDIT</strong></p>
<pre><code>res_pods = v1.list_pod_for_all_namespaces(pretty=True)
for i in res_pods.items:
    for j in i.spec.containers:
        if j.resources.requests or j.resources.limits:
            print(i.spec.node_name, j.name, j.resources)
</code></pre>
