Plug-in di autenticazione deprecato per i client Kubernetes
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Nella versione 1.22 di Kubernetes, il progetto Kubernetes ha ritirato il meccanismo di autenticazione integrato utilizzato dai client come lo strumento a riga di comando kubectl per accedere al server API Kubernetes. È prevista la rimozione del meccanismo di autenticazione integrato in Kubernetes 1.26. Per il contesto, consulta
GitHub PR 102181.
La rimozione non influisce sugli operatori di cui è stato eseguito il deployment nel cluster e che utilizzano account di servizio Kubernetes per comunicare con il server API.
Cosa dovresti fare?
GKE ha rilasciato un plug-in di autenticazione aggiornato,
gke-gcloud-auth-plugin. Questo plug-in utilizza il framework client-go Credential Plugins per fornire token di autenticazione per comunicare con i cluster GKE.
Devi installare il plug-in prima di aggiornare i client a riga di comando alla versione 1.26 e successive. Se non installi il plug-in, viene visualizzato un messaggio di errore simile al seguente.
Errore di esempio: nessun provider di autenticazione trovato
Unable to connect to the server: getting credentials: exec: executable gke-gcloud-auth-plugin not found
panic: no Auth Provider found for name gcp
Errore di esempio: file eseguibile gke-cloud-auth-plugin non trovato
Unable to connect to the server: getting credentials: exec: executable gke-gcloud-auth-plugin not found
It looks like you are trying to use a client-go credential plugin that is not installed.
To learn more about this feature, consult the documentation available at:
https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins
Install gke-gcloud-auth-plugin for use with kubectl by following \
https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-04 UTC."],[],[],null,["# Deprecated authentication plugin for Kubernetes clients\n\n*** ** * ** ***\n\nIn Kubernetes version 1.22, the Kubernetes project deprecated the built-in\nauthentication mechanism used by clients such as the `kubectl` command-line tool\nto access the Kubernetes API server. The built-in authentication mechanism is\nscheduled for removal in Kubernetes 1.26. For context, refer to\n[GitHub PR 102181](https://github.com/kubernetes/kubernetes/pull/102181).\n\nThe removal doesn't affect operators that are deployed in the cluster and use\nKubernetes service accounts to communicate with the API server.\n\nWhat should you do?\n-------------------\n\nGKE released an updated authentication plugin,\n`gke-gcloud-auth-plugin`. This plugin uses the\n[client-go Credential Plugins](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins)\nframework to provide authentication tokens to communicate with\nGKE clusters.\n\nYou must install the plugin before you update your command-line clients\nto version 1.26 and later. If you don't install the plugin, you'll notice an\nerror message similar to the following.\n\nFor instructions, refer to\n[Install required plugins](/kubernetes-engine/docs/how-to/cluster-access-for-kubectl#install_plugin).\n\n### Example error: No auth provider found\n\n Unable to connect to the server: getting credentials: exec: executable gke-gcloud-auth-plugin not found\n\n panic: no Auth Provider found for name gcp\n\n### Example error: Executable gke-cloud-auth-plugin not found\n\n Unable to connect to the server: getting credentials: exec: executable gke-gcloud-auth-plugin not found\n\n It looks like you are trying to use a client-go credential plugin that is not installed.\n\n To learn more about this feature, consult the documentation available at:\n https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins\n\n Install gke-gcloud-auth-plugin for use with kubectl by following \\\n https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke."]]