Mettez à jour un fichier kubeconfig avec les identifiants et les informations sur les points de terminaison appropriés pour activer les appels kubectl pour un cluster Kubernetes spécifique.
EXAMPLES
To switch to working on a specific Kubernetes cluster named 'sample', run:
gdcloud get-credentials sample
INDICATEURS FACULTATIFS
--zone string Zone to use for this invocation. To preset the zone flag for all commands that require it, run: "gdcloud config set core/zone ZONE". The zone flag is available only in multi-zone environments.
OPTIONS GCLOUD GÉNÉRALES
Ces options sont disponibles pour toutes les commandes : --configuration, --format, --help, --project, --quiet.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[[["\u003cp\u003eThe \u003ccode\u003egdcloud clusters get-credentials\u003c/code\u003e command fetches credentials for a specified Kubernetes cluster.\u003c/p\u003e\n"],["\u003cp\u003eIt updates the kubeconfig file, enabling \u003ccode\u003ekubectl\u003c/code\u003e calls to that cluster.\u003c/p\u003e\n"],["\u003cp\u003eThe command requires the \u003ccode\u003eCLUSTER_NAME\u003c/code\u003e as an argument.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e--zone\u003c/code\u003e flag is available for multi-zone environments.\u003c/p\u003e\n"],["\u003cp\u003eThe command also supports the gdcloud wide flags: \u003ccode\u003e--configuration\u003c/code\u003e, \u003ccode\u003e--format\u003c/code\u003e, \u003ccode\u003e--help\u003c/code\u003e, \u003ccode\u003e--project\u003c/code\u003e, and \u003ccode\u003e--quiet\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# gdcloud clusters get-credentials\n\nNAME\n----\n\ngdcloud clusters get-credentials - Fetch credentials for a Kubernetes cluster.\n\nSYNOPSIS\n--------\n\n gdcloud clusters get-credentials CLUSTER_NAME [flags]\n\nDESCRIPTION\n-----------\n\nUpdate a kubeconfig file with appropriate credentials and endpoint information to enable kubectl calls for a specific Kubernetes cluster.\n\n### EXAMPLES\n\n To switch to working on a specific Kubernetes cluster named 'sample', run:\n\n gdcloud get-credentials sample\n\n### OPTIONAL FLAGS\n\n --zone string Zone to use for this invocation. To preset the zone flag for all commands that require it, run: \"gdcloud config set core/zone ZONE\". The zone flag is available only in multi-zone environments.\n\n### GDCLOUD WIDE FLAGS\n\nThese flags are available to all commands: `--configuration`, `--format`, `--help`, `--project`, `--quiet`.\n\nFor more information, see the [gdcloud CLI reference overview](/distributed-cloud/hosted/docs/latest/gdch/resources/gdcloud-reference/gdcloud) page."]]