为容器化开发环境设置 ADC
对 Cloud Run 或 Google Kubernetes Engine 上运行的容器化应用进行身份验证时,本地测试环境与 Trusted Cloud 环境的处理方式不同。
在本地测试容器化应用
如需在本地工作站上测试容器化应用,您可以将容器配置为使用本地 ADC 文件进行身份验证。如需了解详情,请参阅使用 Google 账号配置 ADC。
如需测试您的实现,请使用本地 Kubernetes 实现,例如 minikube
和 gcp-auth
插件。
在 Trusted Cloud上运行容器化应用
请参阅从 GKE 工作负载访问 Trusted Cloud API。
后续步骤
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-08。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-08。"],[[["Authentication for containerized applications differs between local testing and Google Cloud environments."],["Local testing uses a local Application Default Credentials (ADC) file, configurable via a Google Account."],["Local Kubernetes implementations like `minikube` with the `gcp-auth` addon are recommended for testing."],["Authentication setup in Google Cloud varies based on the environment, including GKE Enterprise, GKE, and Knative serving."],["Workload Identity federation should be used for GKE and Knative serving."]]],[]]