Giter Site home page Giter Site logo

Comments (15)

szczeles avatar szczeles commented on August 17, 2024 3

@arekkusu In order to reset the token, after set account you need to run rm $HOME/.kube/gke_gcloud_auth_plugin_cache, so the plugin will not reuse cached token.

Thanks for the hint with CLOUDSDK_CORE_ACCOUNT, I can use it as a temporary workaround until the account option is implemented.

from cloud-provider-gcp.

szczeles avatar szczeles commented on August 17, 2024 1

@darklore It would be slightly better, but still gke-gcloud-auth-plugin needs to keep multiple caches of the token to make work efficient (in either one file or multiple files, maybe prefixed with account name?)

from cloud-provider-gcp.

JessMWalters avatar JessMWalters commented on August 17, 2024 1

#473 Should solve this issue

from cloud-provider-gcp.

arekkusu avatar arekkusu commented on August 17, 2024
gcloud config set account ... 

Do you mean running gcloud config set account... followed by gcloud container clusters get-credentials ... ?
(I don't think setting the account alone is enough, when I tested gke-gcloud-auth-plugin always returned the same token)

FYI you can do this to get cluster credential while setting (overwriting) the account using env variable:

[email protected]; gcloud container clusters get-credentials log

The above + some bash scripting (or kubectl wrapper or even addon may work as a workaround.

In any case I agree it would be nice if gke-gcloud-auth-plugin could add support for this.

from cloud-provider-gcp.

darklore avatar darklore commented on August 17, 2024

Is it helpful to you to use CLOUDSDK_CORE_ACCOUNT in .kube/config ?
Such like

users:
  - name: user
     user:
        exec:
            apiVersion: client.authentication.k8s.io/v1beta1
            command: gke-gcloud-auth-plugin
            env:
              - name: CLOUDSDK_CORE_ACCOUNT
                value: [email protected]

from cloud-provider-gcp.

darklore avatar darklore commented on August 17, 2024

Yes. I agree.

from cloud-provider-gcp.

k8s-triage-robot avatar k8s-triage-robot commented on August 17, 2024

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

from cloud-provider-gcp.

szczeles avatar szczeles commented on August 17, 2024

/remove-lifecycle stale

from cloud-provider-gcp.

k8s-triage-robot avatar k8s-triage-robot commented on August 17, 2024

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

from cloud-provider-gcp.

szczeles avatar szczeles commented on August 17, 2024

/remove-lifecycle stale

from cloud-provider-gcp.

k8s-triage-robot avatar k8s-triage-robot commented on August 17, 2024

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

from cloud-provider-gcp.

k8s-triage-robot avatar k8s-triage-robot commented on August 17, 2024

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

from cloud-provider-gcp.

marfenij avatar marfenij commented on August 17, 2024

this already work for Google Cloud SDK 428.0.0

account can be specified for user in kube config

- name: USER_ALIAS
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1beta1
      args:
      - [email protected]
      command: gke-gcloud-auth-plugin
      env: null
      installHint: Install gke-gcloud-auth-plugin for use with kubectl by following
        https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke
      interactiveMode: IfAvailable
      provideClusterInfo: true

from cloud-provider-gcp.

zshihang avatar zshihang commented on August 17, 2024

/close

from cloud-provider-gcp.

k8s-ci-robot avatar k8s-ci-robot commented on August 17, 2024

@zshihang: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

from cloud-provider-gcp.

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.