1

I have install gke on a test account and configured the cli.

kuebctl get pods 

is giving below warning.

W0916 17:23:58.063534   67381 gcp.go:119] WARNING: the gcp auth plugin is deprecated in v1.22+, unavailable in v1.26+; use gcloud instead.
To learn more, consult https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke
No resources found in default namespace.

But I already installed the gcloud-auth-plugin

sudo apt-get install google-cloud-sdk-gke-gcloud-auth-plugin
Reading package lists... Done
Building dependency tree
Reading state information... Done
google-cloud-sdk-gke-gcloud-auth-plugin is already the newest version (402.0.0-0).
0 upgraded, 0 newly installed, 0 to remove and 61 not upgraded.

But still why I am getting this warning? Any suggestions on how to fix this?

gke-gcloud-auth-plugin --version
Kubernetes v1.24.0-alpha+f42d1572e39979f6f7de03bd163f8ec04bc7950d
5
  • Did you do the "Verify installation" and "Run kubectl with the new plugin prior to the release of v1.26" steps on that page?
    – ceejayoz
    Sep 16 at 17:50
  • yes I did, but still same
    – Kalel
    Sep 16 at 18:18
  • You'll very likely have to change the exec: inside your $KUBECONFIG to have it switch over to use gcloud; it may be easier to just ask gcloud to make you a new kubeconfig, unless you already have a lot of customizations therein
    – mdaniel
    Sep 16 at 20:11
  • i performed all the steps in this link as shown in warning message, cloud.google.com/blog/products/containers-kubernetes/… but same issue, Can you please elaborate what step you are suggesting
    – Kalel
    Sep 17 at 9:29
  • @Kalel can you run the below command and send the output for further analysis: kubectl get namespace Sep 27 at 8:36

1 Answer 1

1

You need to ensure you've installed the plugin and set:

USE_GKE_GCLOUD_AUTH_PLUGIN=True

For your environment. Then run:

gcloud container clusters get-credentials ...

The warning should go after that when running any kubectl commands.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.