Menyiapkan ADC untuk lingkungan pengembangan dalam container
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Autentikasi untuk aplikasi dalam container yang berjalan di Cloud Run, Google Kubernetes Engine, atau GKE Enterprise ditangani secara berbeda antara lingkungan pengujian lokal dan lingkungan Google Cloud .
Menguji aplikasi dalam container secara lokal
Untuk menguji aplikasi dalam container di workstation lokal, Anda dapat
mengonfigurasi container untuk melakukan autentikasi dengan
file ADC lokal. Untuk mengetahui informasi selengkapnya, lihat
Mengonfigurasi ADC dengan Akun Google Anda.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-04 UTC."],[[["\u003cp\u003eAuthentication for containerized applications differs between local testing and Google Cloud environments.\u003c/p\u003e\n"],["\u003cp\u003eLocal testing uses a local Application Default Credentials (ADC) file, configurable via a Google Account.\u003c/p\u003e\n"],["\u003cp\u003eLocal Kubernetes implementations like \u003ccode\u003eminikube\u003c/code\u003e with the \u003ccode\u003egcp-auth\u003c/code\u003e addon are recommended for testing.\u003c/p\u003e\n"],["\u003cp\u003eAuthentication setup in Google Cloud varies based on the environment, including GKE Enterprise, GKE, and Knative serving.\u003c/p\u003e\n"],["\u003cp\u003eWorkload Identity federation should be used for GKE and Knative serving.\u003c/p\u003e\n"]]],[],null,["Authentication for containerized applications running on Cloud Run,\nGoogle Kubernetes Engine, or GKE Enterprise is handled differently between local\ntesting environments and Google Cloud environments.\n\nTest containerized applications locally\n\nTo test your containerized application on your local workstation, you can\nconfigure your container to authenticate with your\n[local ADC file](/docs/authentication/application-default-credentials#personal). For more information, see\n[Configure ADC with your Google Account](/docs/authentication/set-up-adc-local-dev-environment#google-idp).\n\nTo test your implementation, use a local Kubernetes implementation such as\n[`minikube` and the `gcp-auth` addon](https://minikube.sigs.k8s.io/docs/handbook/addons/gcp-auth/).\n\nRun containerized applications on Google Cloud\n\nYou set up authentication for Google Cloud containerized environments\ndifferently depending on the environment:\n\n- For Cloud Run, see [call Google Cloud APIs with the service identity](/run/docs/securing/service-identity#call-apis-with-service-identity).\n- For GKE, see [Access Google Cloud APIs from GKE workloads](/kubernetes-engine/docs/how-to/workload-identity).\n- For GKE Enterprise, see the [authentication overview](/anthos/multicluster-management/gateway) and [Use fleet Workload Identity Federation for GKE](/anthos/multicluster-management/fleets/workload-identity).\n- For Knative serving, see [Using Workload Identity Federation for GKE for Knative serving](/anthos/run/docs/securing/workload-identity).\n\n\u003cbr /\u003e\n\nWhat's next\n\n- Learn more about [how ADC finds credentials](/docs/authentication/application-default-credentials).\n- [Authenticate for using Cloud Client Libraries](/docs/authentication/client-libraries).\n- [Authenticate for using REST](/docs/authentication/rest).\n- Explore [authentication methods](/docs/authentication)."]]