I want to fetch the kubernetes CPU utilization and memory usage data points for last 7 days using kubernetes-client library for node js.
I'm using godaddy's kubernetes client library.
https://github.com/godaddy/kubernetes-client
Which function should I call to get pods metrices details?
You shouldn't try to query stuff like CPU utilization and memory usage from the kubeernetes API.
Instead, you should query cAdvisor for that. They have a go client you can use to query the metrics directly, but it's more conventional to install prometheus on your cluster and query metrics from there.