Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KubernetesPodOperator is not supported currently -> needs kubeconfig #14

Open
kirajano opened this issue Mar 14, 2023 · 8 comments
Open

Comments

@kirajano
Copy link

kirajano commented Mar 14, 2023

As per current setup, the local credentials are not mounted and have to be somehow manually copied. The file ~/.kube/config is not mounted and hence inside the container you cannot interact with K8S clusters. Solution is needed to make K8s workloads testable in Airflow.

Opened PR #15 please feel free to check

@piotrwrotniak
Copy link
Collaborator

piotrwrotniak commented Mar 14, 2023

I think one can always use mounted GCP credentials to retrieve GKE cluster kubeconfig by invoking gcloud: https://cloud.google.com/sdk/gcloud/reference/container/clusters/get-credentials.

I'm not sure whether we want to expose any additional credentials stored locally to the running Composer Local Environment, let me get back to you on this.

@kirajano
Copy link
Author

Thanks for you reply,
The suggestion makes sense if your run only GKE clusters but for others you have to then manually make additional setup. In addition, you already have your local config with aliases, preferences etc. already there. Fetching credentials from GCP would then be creating a new config from scratch - although this is really more about convenience.

Looking forward to your verdict.

@fpopic
Copy link

fpopic commented Apr 26, 2023

I think one can always use mounted GCP credentials to retrieve GKE cluster kubeconfig by invoking gcloud: https://cloud.google.com/sdk/gcloud/reference/container/clusters/get-credentials.

@piotrwrotniak it would be nice to either provide support to add custom docker volume mounts or support the airflow to K8s auth order as-is without the need for additional setup, the same way ADC works for gcloud auth without any intervention within the container.

@msgongora
Copy link

I think one can always use mounted GCP credentials to retrieve GKE cluster kubeconfig

@piotrwrotniak What if you use a local cluster through minikube, Docker Desktop, etc? Aren't we talking about local development? This is a legit issue.

@fpopic
Copy link

fpopic commented Jul 18, 2023

Hi @piotrwrotniak, any update or estimation when issues/PRs in this repository are getting some attention?

Otherwise forking will start very early, and it would be nicer if the OSS community is focused on one repository than in forks (esp. since the whole airflow/composer is relying on OSS)

@michalmodras
Copy link
Collaborator

The way forward we'll be supporting custom mounts - we'll be working on this (Cloud Composer).

@mbaltrusitis
Copy link

@michalmodras do you know when you can expect an update?

@ahidalgob
Copy link
Member

See #15 (comment), it will be included in the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants