Error in using Horizontal Pod Autoscaler(HPA) for statefulset

I am trying to use hpa for statefulset application. I am getting following error in the logs:
“unable to get metrics for resource cpu: failed to get pod resource metrics: the server could not find the requested resource (get services http:heapster:)”.
I went through the solutions available online but none is working for me.
I installed the metrics service API from here:

Any idea how to solve this?