-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autoscale of pubsub subscriber is failing with error #140
Comments
As updated in GoogleCloudPlatform/k8s-stackdriver#315 by @aubm i was able to get this to work
|
Thank you very much for reporting this issue. The issue seems to be present only for clusters that have Workload Identity enabled. All our docs are based on the default cluster setup enabled for clusters created via the I have updated the documentation to inform the readers about it and have pointed to the Github k8s-stackdriver setup example. The second step "Start Custom Metrics - Stackdriver Adapter" explains the steps required which are similar to the ones you have shared above. For reference, we can get the setup from the tutorial working (for WI enabled clusters) by executing the following steps before the step to "Download the service account key file". gcloud projects add-iam-policy-binding "$PROJECT_ID" \
--member "serviceAccount:autoscaling-pubsub-sa@$PROJECT_ID.iam.gserviceaccount.com" \
--role "roles/monitoring.editor"
gcloud iam service-accounts add-iam-policy-binding \
--role roles/iam.workloadIdentityUser \
--member "serviceAccount:$PROJECT_ID.svc.id.goog[custom-metrics/custom-metrics-stackdriver-adapter]" \
autoscaling-pubsub-sa@$PROJECT_ID.iam.gserviceaccount.com
kubectl annotate serviceaccount \
--namespace custom-metrics \
custom-metrics-stackdriver-adapter \
iam.gke.io/gcp-service-account=autoscaling-pubsub-sa@$PROJECT_ID.iam.gserviceaccount.com Please note that it might take a few minutes for the service account changes to be propagated. Thus, initially the HPA might fail for a bit. Further you can verify if the WI enabled service account was properly linked by following step 7 of this tutorial. |
Followed the article to scale the subscriber : https://cloud.google.com/kubernetes-engine/docs/tutorials/autoscaling-metrics#pubsub_8 however the HPA is failing with mentioned error. I am using a private cluster (1.15.12-gke.2) which should not be an issue as per my understanding.
The text was updated successfully, but these errors were encountered: