title: How do we take a kubernetes cluster-info dump using the kubernetes API
body: <p>Does kubernetes provide an API in its client library to get the cluster-info dump?
  I went through its API <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#-strong-api-overview-strong-" rel="nofollow noreferrer">documentation</a> and could find any API which could actually do this.</p>
  <p><strong>What i do now:</strong></p>
  <pre><code>kubectl cluster-info dump --output-directory=&quot;dumpdir&quot;
  </code></pre>
  <p><strong>What i want:</strong></p>
  <p>Using client-go/kubernetes API libraries, make an API call to get this dump from a golang application. Is it possible?</p>
  <p><strong>What i know:</strong></p>
  <p>There are individual API's for each resource which can provide all the information provided by the cluster-info dump, but i want to do it will a single API call.</p>
  <p>For example, this Golang code will give me a list of nodes:</p>
  <pre><code>coreClient := kubernetesapi.CoreV1()
  nodeList, err := coreClient.Nodes().List(metav1.ListOptions{})
  </code></pre>
  <p>Is there an API which returns what <code>kubectl cluster-info dump</code> would give, so that I can get all the details programmatically?</p>