<p>I want to fetch the kubernetes CPU utilization and memory usage data points for last 7 days using  kubernetes-client library for node js.</p>
<p>I'm using godaddy's kubernetes client library.</p>
<p><a href="https://github.com/godaddy/kubernetes-client" rel="nofollow noreferrer">https://github.com/godaddy/kubernetes-client</a></p>
<p>Which function should I call to get pods metrices details?</p>

<p>You shouldn't try to query stuff like CPU utilization and memory usage from the kubeernetes API.<br />
Instead, you should query cAdvisor for that. They have a <a href="https://github.com/google/cadvisor#remote-rest-api--clients" rel="nofollow noreferrer">go client</a> you can use to query the metrics directly, but it's more conventional to install prometheus on your cluster and query metrics from there.</p>
