Complemento de autenticación obsoleto para clientes de Kubernetes
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
En la versión 1.22 de Kubernetes, el proyecto de Kubernetes hizo que dejara de estar disponible el mecanismo de autenticación integrado que usan los clientes, como la herramienta de línea de comandos de kubectl para acceder al servidor de la API de Kubernetes. El mecanismo de autenticación integrado está programado para quitarse en Kubernetes 1.26. Para obtener contexto, consulta la solicitud de extracción de GitHub 102181.
La eliminación no afecta a los operadores que se implementan en el clúster y usan las cuentas de servicio de Kubernetes para comunicarse con el servidor de la API.
¿Qué deberías hacer?
GKE lanzó un complemento de autenticación actualizado, gke-gcloud-auth-plugin. Este complemento usa el framework de complementos de credenciales de client-go para proporcionar tokens de autenticación a fin de comunicarse con clústeres de GKE.
Debes instalar el complemento antes de actualizar tus clientes de línea de comandos a la versión 1.26 y posteriores. Si no lo instalas, verás un mensaje de error similar al siguiente.
Ejemplo de error: No se encontró ningún proveedor de autenticación
Unable to connect to the server: getting credentials: exec: executable gke-gcloud-auth-plugin not found
panic: no Auth Provider found for name gcp
Error de ejemplo: No se encontró gke-cloud-auth-plugin ejecutable.
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.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-04-30 (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."]]