<p>we are using k8s cluster for one of our application, cluster is owned by other team and we dont have full control over there… We are trying to find out metrics around resource utilization (CPU and memory), detail about running containers/pods/nodes etc. Need to find out how many parallel containers are running. Problem is they have exposed monitoring of cluster via Prometheus but with Prometheus we are not getting live data, it does not have info about running containers.</p>

<p>My query is , what is that API which is by default available in k8s cluster and can give all what we need. We dont want to read data form another client like Prometheus or anything else, we want to read metrics directly from cluster so that data is not stale. Any suggestions?</p>

user2698580
<p>As you mentioned you will need metrics-server (or heapster) to get those information. 
You can confirm if your metrics server is running <code>kubectl top nodes/pods</code> or just by checking if there is a heapster or metrics-server pod present in <code>kube-system</code> namespace. </p>

<p>Also the provided command would be able to show you the information you are looking for. I wont go into details as <a href="https://github.com/kubernetes/kubernetes/issues/17512" rel="nofollow noreferrer">here</a> you can find a lot of clues and ways of looking at cluster resource usage. You should probably take a look at <a href="https://github.com/google/cadvisor" rel="nofollow noreferrer">cadvisor</a> too which should be already present in the cluster. <a href="https://github.com/google/cadvisor/blob/master/docs/web.md" rel="nofollow noreferrer">It exposes a web UI which exports live information about all the containers on the machine</a>. </p>

<p>Other than that there are probably commercial ways of acheiving what you are looking for, for example <a href="https://www.signalfx.com/kubernetes-monitoring/" rel="nofollow noreferrer">SignalFx</a> and other similar projects - but this will probably require the cluster administrator involvement. </p>
