gcp auth plugin is deprecated in v1.22+

This issue has been tracked since 2022-05-25.

Hello guys,

current deprecation warning in one of our deployments (google-github-actions/[email protected]):

4727 gcp.go:120] WARNING: the gcp auth plugin is deprecated in v1.22+, unavailable in v1.25+; use gcloud instead.
To learn more, consult https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke

is this issue already addressed/fixed in a newer version of the setup-gcloud action?

sethvargo wrote this answer on 2022-05-25

Hi @rd-michel

Could you please share your action.yml so we can reproduce? That error is coming from gcp.go, which is not a file in this repo, so it's difficult to understand exactly what's going on without seeing the action.yml.

bharathkkb wrote this answer on 2022-05-25

@rd-michel If you are generating credentials via gcloud container clusters get-credentials, you can install the new auth plugin component gke-gcloud-auth-plugin via this input or you can switch to our native action https://github.com/google-github-actions/get-gke-credentials

junjunjunk wrote this answer on 2022-06-03

Hi @bharathkkb
I would like to confirm that my understanding is correct.

I understand that the former method would require setting USE_GKE_GCLOUD_AUTH_PLUGIN=True in the environment variable of all github actions that use kubectl.

With the latter method, we could set the opiton use_auth_provider:true and avoid setting environment variables.

Am I correct in understanding that in the former method, there is no option to configure whether to use auth-plugin, so there is no other way than to set an environment variable?

Sorry, I thought I had to enable the GCP auth plugin. Sorry for the confusion.

avelez93 wrote this answer on 2022-06-09

I have the same problem.
This is my .yml:

apiVersion: kubeflow.org/v1
kind: TFJob
name: multi-worker
cleanPodPolicy: None
replicas: 3
restartPolicy: OnFailure
- name: tensorflow
image: mnist
- --epochs=4
- --steps_per_epoch=100
- --per_worker_batch=64
- --saved_model_path=gs://gwiklabs-gcp-01-f90cda69125e-bucket/saved_model_dir
- --checkpoint_path=gs://gwiklabs-gcp-01-f90cda69125e-bucket/checkpoints

bharathkkb wrote this answer on 2022-06-14

@junjunjunk When using https://github.com/google-github-actions/get-gke-credentials to generate a kubeconfig, it does not use the auth plugin unless use_auth_provider:true is set.

junjunjunk wrote this answer on 2022-06-20

Thank you!

ernani wrote this answer on 2022-07-18

I find this really hard as I do have the env var set to true in my local GCE VM but it stills warns me and I have the latest gcloud cli installed.

For some reason the export command wasn't being picked up and now it is. It works.

Moon1706 wrote this answer on 2022-07-30


      - name: "Auth to GCP exist env"
        uses: google-github-actions/[email protected]
          credentials_json: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}
      - name: "Set up Cloud SDK"
        uses: google-github-actions/[email protected]
          install_components: 'gke-gcloud-auth-plugin'
      - name: "Connect to cluster"
        uses: google-github-actions/[email protected]
          cluster_name: keptn-test
          location: europe-west3-c
          project_id: sap-artifactory-dev
          use_auth_provider: true

Test output:

W0730 08:58:38.810648    1808 gcp.go:1[20](https://github.com/Moon1706/test/runs/7590470365?check_suite_focus=true#step:7:21)] WARNING: the gcp auth plugin is deprecated in v1.22+, unavailable in v1.25+; use gcloud instead.
To learn more, consult https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke
NAME              STATUS   AGE
default           Active   5d2h
keptn             Active   3d
kube-node-lease   Active   5d2h
kube-public       Active   5d2h
kube-system       Active   5d2h
monitoring        Active   3d

Are you sure that your approach works?

junjunjunk wrote this answer on 2022-07-31

I think you should delete use_auth_provider: true.
This opitons enables gcp auth plugin, which is deperecated in v1.22+.

sml-virta wrote this answer on 2022-09-21

I am also encountering this. I believe it is the helm binary that we are using in our deploy step that is producing this error. Since helm is being installed out of the box along with the official setup-gcloud action (I presume? I don't know where else it would be coming from), this definitely seems like a bug in the action itself and not a usage error.

We should be able to use the version of helm that is installed by setup-gcloud without seeing this warning.

James-DBA-Anderson wrote this answer on 2022-12-19

I having a related issue with this in my CI when running Composer commands to delete AirFlow DAGs:


The deletion of the DAG from storage works, but I guess the command to delete the DAG from AirFlow's UI requires kubectl. Any indication of what to try next would be great!

runs-on: ubuntu-latest
 - uses: 'actions/[email protected]'

 - id: 'auth'
   uses: 'google-github-actions/[email protected]'
     credentials_json: '${{ secrets.dev }}'

 - name: 'Set up Cloud SDK'
   uses: 'google-github-actions/[email protected]'
     install_components: 'gke-gcloud-auth-plugin'
 - name: 'Delete DAG'
   run: |
     gcloud composer environments storage dags delete \
     --environment MY_ENV \
     --location europe-west2 \
     gcloud composer environments run MY_ENV \
     --location europe-west2 \
     dags delete -- "teset_dag"
twistedpair wrote this answer on 2022-12-19

@James-DBA-Anderson , see this doc. It should explain what's changed and needed.

James-DBA-Anderson wrote this answer on 2022-12-19

Thanks @twistedpair, I was already using install_components: 'gke-gcloud-auth-plugin' in my setup cloud SDK step and after reading that doc I have added the following to the top of my yaml:


This works locally, but results in the following error in CI:


I can't see anything else that I should be trying from that doc.

mai-nakagawa wrote this answer on 2022-12-20


@James-DBA-Anderson I think you should use true instead of True. It's not Python but YAML 😄

More Details About Repo
Owner Name google-github-actions
Repo Name setup-gcloud
Full Name google-github-actions/setup-gcloud
Language TypeScript
Created Date 2019-11-05
Updated Date 2023-03-23
Star Count 1505
Watcher Count 65
Fork Count 548
Issue Count 11


Issue Title Created Date Updated Date