GKE - HPA using custom metrics - unable to fetch metrics
The problem was with the custom-metrics-stackdriver-adapter
. It was crashing in the metrics-server
namespace.
Using the resource found here:
https://raw.githubusercontent.com/GoogleCloudPlatform/k8s-stackdriver/master/custom-metrics-stackdriver-adapter/deploy/production/adapter.yaml
And using this image for the deployment (my version was v0.10.2):
gcr.io/google-containers/custom-metrics-stackdriver-adapter:v0.10.1
This fixed the crashing pod, and now the hpa fetch the custom metric.