{"id":874,"date":"2024-03-28T15:22:15","date_gmt":"2024-03-28T15:22:15","guid":{"rendered":"https:\/\/blog.ngocha.biz\/?p=874"},"modified":"2024-03-28T15:22:15","modified_gmt":"2024-03-28T15:22:15","slug":"gke-gcloud-auth-plugin-not-found","status":"publish","type":"post","link":"https:\/\/blog.ngocha.biz\/?p=874","title":{"rendered":"[Solved] gke-gcloud-auth-plugin, was not found or is not executable"},"content":{"rendered":"<p>If you have <a href=\"https:\/\/devopscube.com\/setup-google-cloud-clisdk\/\">installed gcloud CLI<\/a> and <a href=\"https:\/\/devopscube.com\/setup-kubernetes-cluster-google-cloud\/\">setup a GKE cluster<\/a>. However, when you try to connect to the GKE cluster using gcloud command you get the following error.<\/p>\n<pre><code>CRITICAL: ACTION REQUIRED: gke-gcloud-auth-plugin, which is needed for continued use of kubectl, was not found or is not executable. Install gke-gcloud-auth-plugin for use with kubectl by following https:\/\/cloud.google.com\/kubernetes-engine\/docs\/how-to\/cluster-access-for-kubectl#install_plugin<\/code><\/pre>\n<p>This issue is caused due to the authentication changes in <strong>GKE v1.26<\/strong>. To rectify this issue you need to install the kubectl <strong>gke-gcloud-auth-plugin<\/strong> so that you can use kubectl to connect to GKE clusters.<\/p>\n<p><strong>gke-gcloud-auth-plugin<\/strong> is based on the official <a href=\"https:\/\/kubernetes.io\/docs\/reference\/access-authn-authz\/authentication\/?ref=devopscube.com#client-go-credential-plugins\">client-go credential plugins<\/a> that is focussed on client side integration with support or LDAP, Kerberos, OAuth2, SAML, etc. gcloud auth is based on OAuth2.<\/p>\n<h2 id=\"install-gke-gcloud-auth-plugin\">Install gke-gcloud-auth-plugin<\/h2>\n<p>You can install the <strong>gke-gcloud-auth-plugin<\/strong> plugin using the following gcloud command.<\/p>\n<pre><code>gcloud components install gke-gcloud-auth-plugin<\/code><\/pre>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-48-8.png\" class=\"kg-image\" alt=\"Install gke-gcloud-auth-plugin\" loading=\"lazy\" width=\"659\" height=\"717\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-48-8.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-48-8.png 659w\"><\/figure>\n<h2 id=\"validate-gke-gcloud-auth-plugin\">Validate gke-gcloud-auth-plugin<\/h2>\n<p>To validate the gke-gcloud-auth-plugin, you can run the gcloud command to connect to the <a href=\"https:\/\/devopscube.com\/setup-kubernetes-cluster-kubeadm\/\">Kubernetes cluster<\/a>.<\/p>\n<p>Here is an example command that you get from the GKE console.<\/p>\n<pre><code>$ gcloud container clusters get-credentials prometheus-cluster --zone us-central1-c --project aerial-reef-417506\n\n\nFetching cluster endpoint and auth data.\nkubeconfig entry generated for prometheus-cluster.<\/code><\/pre>\n<p>As you can see from the output, the authentication is successfull and the GKE cluster configuration is added as the <a href=\"https:\/\/devopscube.com\/kubernetes-kubeconfig-file\/\">kubeconfig<\/a> entry.<\/p>\n<p>If you are getting started with Kubernetes, check out our list of <a href=\"https:\/\/devopscube.com\/kubernetes-tutorials-beginners\/\">comprehensive Kubernetes tutorials.<\/a><\/p>\n<hr>\n<p><strong>Ngu\u1ed3n:<\/strong> <a href=\"https:\/\/devopscube.com\/gke-gcloud-auth-plugin-not-found\/\" target=\"_blank\" rel=\"noopener noreferrer\">[Solved] gke-gcloud-auth-plugin, was not found or is not executable \u2014 DevOpsCube<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Source: https:\/\/devopscube.com\/gke-gcloud-auth-plugin-not-found\/<\/p>\n","protected":false},"author":1,"featured_media":875,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-874","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops"],"_links":{"self":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/posts\/874","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=874"}],"version-history":[{"count":0,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/posts\/874\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/media\/875"}],"wp:attachment":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=874"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=874"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=874"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}