Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Zugriffsmethode für die Anmeldung in Clustern auswählen
Dieses Dokument richtet sich an Entwickler und andere GKE-Clusternutzer, die sich über die Befehlszeile mit GKE Identity Service in Clustern anmelden müssen.
Vorbereitung
Über die Befehlszeile anmelden
Wenn Sie sich über die Befehlszeile in Clustern mit GKE Identity Service anmelden möchten, müssen Sie gcloud-Authentifizierungsbefehle ausführen. Wenn Sie eine der Befehlszeilenoptionen für die Anmeldung verwenden möchten, gehen Sie so vor:
Prüfen Sie, ob die folgenden Befehlszeilentools installiert sind:
Die neueste Version der Google Cloud CLI, die gcloud, das Befehlszeilentool für die Interaktion mit Google Cloud, enthält. Informationen zur Installation des Google Cloud CLI finden Sie in der Installationsanleitung.
kubectl zum Ausführen von Befehlen für Kubernetes-Cluster. Informationen zum Installieren von kubectl finden Sie in der Installationsanleitung.
Führen Sie die folgenden Befehle aus, um die Komponente anthos-auth zu installieren oder zu aktualisieren:
Prüfen Sie mit dem folgenden Befehl, ob die Komponente erfolgreich installiert wurde:
gcloud anthos auth version
Wenn eine Version zurückgegeben wird, war Ihre Installation erfolgreich.
Über die Google Cloud Console anmelden
Nur bei OIDC- und AzureAD-Anbietern können Sie sich auch ohne Konfigurationsdatei oder FQDN über die Google Cloud Console in Clustern anmelden. Weitere Informationen finden Sie unter Über die Google Cloud Console mit Clustern arbeiten.
Zugriffsmethoden für die Anmeldung in Clustern
Verwenden Sie eine der folgenden Zugriffsmethoden, um sich in Ihren konfigurierten Clustern anzumelden:
Über die Befehlszeile mit FQDN-Zugriff anmelden: Informationen dazu, wie Sie sich mit einem voll qualifizierten Domainnamen in Ihren Clustern anmelden, finden Sie unter FQDN-Zugriff.
Über die Befehlszeile mit dateibasiertem Zugriff anmelden: Informationen dazu, wie Sie sich mit einer Konfigurationsdatei in Ihren Clustern anmelden, finden Sie unter Dateibasierter Zugriff.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2024-11-29 (UTC)."],[],[],null,["# Choose an access method to log in to clusters\n=============================================\n\nThis document is for developers and other GKE cluster users who need to log in to clusters from the command line using GKE Identity Service.\n\nBefore you begin\n----------------\n\n- Log in from the command line\n\n Logging in to clusters with GKE Identity Service from the command line requires running `gcloud` authentication commands. If you want to use one of the command line login options, do the following:\n 1. Ensure that you have the following command line tools installed:\n\n - The latest version of the Google Cloud CLI, which includes `gcloud`, the command line tool for interacting with Google Cloud. If you need to install the Google Cloud CLI, see the [installation guide](/sdk/docs/install).\n - `kubectl` for running commands against Kubernetes clusters. If you need to install `kubectl`, see the [installation guide](/kubernetes-engine/docs/how-to/cluster-access-for-kubectl).\n 2. Run the following commands to install or update the `anthos-auth` component:\n\n ```\n gcloud components update\n gcloud components install anthos-auth\n ```\n 3. Verify that the component was installed successfully by running the following command:\n\n ```\n gcloud anthos auth version\n ```\n\n If a version is returned, your installation was successful.\n- Log in from the Google Cloud console\n\n For OIDC and AzureAD providers only, you can also log in to clusters from the Google Cloud console without a configuration file or FQDN. For more information, see [Work with clusters from the Google Cloud console](/kubernetes-engine/fleet-management/docs/console).\n\nAccess methods to log in to clusters\n------------------------------------\n\nTo log in to your configured clusters, use one of the following access methods:\n\n- **Log in from the command line with FQDN access** : If you need to log in to your clusters using a fully qualified domain name, see [FQDN access](/kubernetes-engine/enterprise/identity/setup/authenticate-fqdn-access).\n- **Log in from the command line with file-based access** : If you need to log in to your clusters with a configuration file, see [file-based access](/kubernetes-engine/enterprise/identity/setup/authenticate-file-access)."]]