actions-hub / gcloud

GitHub Action for interacting with Google Cloud Platform (GCP)
https://github.com/marketplace/actions/google-cloud-platform-gcp-cli-gcloud
MIT License
229 stars 28 forks source link

Missing component when run composer command #23

Closed totogo closed 3 years ago

totogo commented 3 years ago

When I try to run airflow command in Composer environment, like this one

- name: Import Variable
  uses: actions-hub/gcloud@master
  with:
    args: composer environments run my-env --location=europe-west1 variables -- import /home/airflow/gcs/data/vars.json

I got this error:

WARNING: Accessing a Kubernetes Engine cluster requires the kubernetes commandline
client [kubectl]. To install, run
  $ gcloud components install kubectl
kubeconfig entry generated for europe-west1-d6-dwh-dev-d1ca4d08-gke.
ERROR: (gcloud.composer.environments.run) Accessing a Cloud Composer environment requires the kubernetes commandline
client [kubectl]. To install, run
  $ gcloud components install kubectl

So is it possible to include this component gcloud components install kubectl?

exelban commented 3 years ago

Hi. Yes, I think it's possible. Could you maybe do a PR with this feature?

rotsmi commented 1 year ago

Hello, seems that this is not ready to be closed. Indeed PR #28 add support to run kubectl by passing the cli option, the issue still persist when we try to run the composer command. Would it be possible also to add documentation on how can we use gcloud to interact with GCP Composer 2?