Prometheus scaler cannot authenticate to GCP Managed Prometheus using Workload Identity after PubSub trigger deprecation #7344
Unanswered
amer-idwise
asked this question in
Q&A / Need Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Environment
prometheusContext
After the deprecation of the native GCP PubSub triggers, the recommended approach is to use the
prometheusscaler against Google Managed Prometheus, as documented here:https://keda.sh/blog/2025-09-15-gcp-deprecations/
The example configuration requires
credentialsFromEnv, which assumes a JSON service account key. This conflicts with GKE Workload Identity, where no JSON key should be used and authentication should rely on the pod identity instead.ScaledObject trigger example
The issue is that
credentialsFromEnvrequires a JSON credentials payload, while in GKE the expected approach is Workload Identity without static credentials.KEDA operator Workload Identity setup
Helm values used when deploying KEDA:
IAM binding applied:
gcloud iam service-accounts add-iam-policy-binding \ {GCP_SA}@{PROJECTID}.iam.gserviceaccount.com \ --role=roles/iam.workloadIdentityUser \ --member="serviceAccount:{PROJECTID}.svc.id.goog[keda/keda-operator]"The GCP service account has the required Monitoring permissions.
Observed behavior
The Prometheus scaler fails to authenticate when querying Google Managed Prometheus.
Event on the ScaledObject:
Expected behavior
The Prometheus scaler should be able to authenticate to Google Managed Prometheus using the KEDA operator pod identity via GKE Workload Identity, without requiring
credentialsFromEnvor a JSON service account key.Problem summary
credentialsFromEnvenforces JSON based credentialsQuestions
credentialsFromEnv?References
Edit
I noticed that KEDA documents support for GCP Workload Identity as described here:
https://keda.sh/docs/2.18/authentication-providers/gcp-workload-identity/
Based on that, I redeployed KEDA using Helm with explicit GCP pod identity configuration.
Helm values used:
Deployment command:
Despite enabling GCP pod identity explicitly, the Prometheus scaler still fails to authenticate against Google Managed Prometheus.
The same error persists:
And also observed as:
Beta Was this translation helpful? Give feedback.
All reactions