简体   繁体   English

应用程序默认凭据不可用

[英]Application Default Credentials not available

I have some Java applications running on Google Compute Engine instances in a Container Engine cluster. 我在容器引擎集群中的Google Compute Engine实例上运行了一些Java应用程序。 I upgraded the cluster to newest version (1.7.8) and changed the node images from the container optimised OS to Ubuntu. 我将群集升级到最新版本(1.7.8),并将节点映像从容器优化的操作系统更改为Ubuntu。 Now my pods are crashing when trying to connect to the cloud sql database with this error message: 现在,当尝试使用此错误消息连接到云SQL数据库时,我的豆荚崩溃了:

The Application Default Credentials are not available. They are available if running in Google Compute Engine.
Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials.
See https://developers.google.com/accounts/docs/application-default-credentials for more information.

The service account is the same as before the upgrade with the scope https://www.googleapis.com/auth/sqlservice.admin 该服务帐户与升级之前的帐户相同,范围为https://www.googleapis.com/auth/sqlservice.admin

Does anyone have an idea why I'm getting this error now? 有谁知道为什么我现在会收到此错误? Is the best solution is to create the environment variable? 最好的解决方案是创建环境变量吗?

Ideally you should be using GOOGLE_APPLICATION_CREDENTIALS environment variable. 理想情况下,您应该使用GOOGLE_APPLICATION_CREDENTIALS环境变量。 Otherwise you are using the "Compute Engine default service account" of the VMs. 否则,您将使用虚拟机的“ Compute Engine默认服务帐户”。

See this tutorial for the best practices: https://cloud.google.com/kubernetes-engine/docs/tutorials/authenticating-to-cloud-platform 有关最佳做法,请参见本教程: https : //cloud.google.com/kubernetes-engine/docs/tutorials/authenticating-to-cloud-platform

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Google Dialogflow:应用程序默认凭据不可用 - Google Dialogflow: The Application Default Credentials are not available GCP DialogFlow API 错误:“应用程序默认凭据不可用” - GCP DialogFlow API error: "The Application Default Credentials are not available" 应用程序默认凭据不可用。 如果在 Google Compute Engine 中运行,它们就可用。 否则 - java android - The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise - java android 应用程序默认凭据不适用于 mac Google Cloud Storage 中的环境变量设置 - The Application Default Credentials are not available with environment variable setup in mac Google Cloud Storage 无法验证 google recaptcha 企业。 收到错误:java.io.IOException:应用程序默认凭据不可用 - Unable to validate google recaptcha enterprise. getting error: java.io.IOException: The Application Default Credentials are not available gcloud:云存储的附录中的默认应用程序凭据(java) - gcloud: Default Application Credentials in appengine for Cloud Storage (java) 如何使用 Google Cloud API - 应用程序默认凭据进行文本检测 - how to use Google Cloud API - Application Default Credentials for text detection 忽略应用程序默认凭证{0}:使用显式设置API密钥 - Ignoring Application Default Credentials {0}: using explicit setting for API key instead 无法获取应用程序默认凭据。 在本地运行 - Unable to get application default credentials. run on locally Google Cloud Platform pub / sub Publisher,如何提供默认应用程序凭据以外的凭据 - Google Cloud Platform pub/sub Publisher, how to supply credentials other than default application credentials
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM