Giter Club home page Giter Club logo

Comments (4)

tksm avatar tksm commented on September 21, 2024 1

Hi,

Stern should work with GKE clusters because GKE uses the client-go credential plugins mechanism. I have tested stern v1.25.0 with gke-gcloud-auth-plugin 0.5.3 on my GKE cluster, and it worked successfully.

Could you please try running gcloud container clusters get-credential to see if it fixes the issue? Your kubeconfig might not have been updated after installing the plugin.

gcloud container clusters get-credentials <CLUSTER> --region <REGION> --project <PROJECT>

from stern.

twocs avatar twocs commented on September 21, 2024 1

I checked ~/.kube/config and the settings seemed to be correct.
I ran gcloud container clusters get-credentials <CLUSTER>. It seems to have done a refresh.

❯ gcloud container clusters get-credentials apod-api                  
Fetching cluster endpoint and auth data.
kubeconfig entry generated for apod-api.

Now stern is working.

from stern.

tksm avatar tksm commented on September 21, 2024 1

I'm glad the issue has been resolved 🎉

I believe that your old kubeconfig was likely using the deprecated gcp auth-provider as follows. The gcp auth-provider was removed in client-go 1.26.

- name: gke_api-project-xxxx
  user:
    auth-provider:
      name: gcp # removed in client-go 1.26

I think your new kubeconfig now correctly uses the new plugin mechanism exec.

- name: gke_api-project-xxxx
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1beta1
      args: null
      command: gke-gcloud-auth-plugin
      # ...

from stern.

tksm avatar tksm commented on September 21, 2024 1

I am closing this as the issue has been resolved. If there are any further problems, please reopen.

from stern.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.