get-gke-credentials icon indicating copy to clipboard operation
get-gke-credentials copied to clipboard

Support gke-gcloud-auth-plugin

Open Markieta opened this issue 2 years ago • 3 comments
trafficstars

TL;DR

Need an option for using gke-gcloud-auth-plugin instead of gcp auth plugin or short-lived access tokens.

use_auth_provider fails on modern versions of GKE:

error: The gcp auth plugin has been removed.
Please use the "gke-gcloud-auth-plugin" kubectl/client-go credential plugin instead.
See https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke for further details
Error: Process completed with exit code 1.

Detailed design

No response

Additional information

No response

Markieta avatar Jan 12 '23 22:01 Markieta

I'd consider this a bug, rather than an enhancement. If the auth plugin doesn't get added, kubectl will break.

michaeldelago avatar Jan 24 '23 17:01 michaeldelago

Hello 👋

I've created a simple GitHub Action for this, feel free to use this until someone integrates setup-gke-gcloud-auth-plugin into get-gke-credentials. I'll try to keep users of simenandre/setup-gke-gcloud-auth-plugin updated on using gke-gcloud-auth-plugin with GitHub Actions as we go.

To get started, drop this in your workflow:

- uses: simenandre/setup-gke-gcloud-auth-plugin@v1

Feel free to open issues and PRs here: https://github.com/simenandre/setup-gke-gcloud-auth-plugin

simenandre avatar Apr 07 '23 17:04 simenandre

Moving to google-github-actions v2 for all actions I need seem to work now for my use case.

chamini2 avatar Feb 06 '24 19:02 chamini2