Repository navigation
Let each team's KubernetesExecutor connect to its own cluster - #75251
Merged
o-nikolas merged 1 commit intoOct 23, 2026
Merged
Conversation
seanghaeli
marked this pull request as ready for review
October 20, 2026 20:20
seanghaeli
requested review from
hussein-awala,
jedcunningham and
jscheffl
as code owners
October 20, 2026 20:20
Contributor
Author
|
re:support per-team kubernetes clusters for Kubernetes and EKS executors @o-nikolas @vincbeck |
seanghaeli
force-pushed
the
ghaeli/kubernetes-executor-team-clusters
branch
from
October 20, 2026 22:29
90af24c to
c32134e
Compare
1 task done
vincbeck
reviewed
Oct 21, 2026
seanghaeli
force-pushed
the
ghaeli/kubernetes-executor-team-clusters
branch
from
October 21, 2026 17:01
c32134e to
7408841
Compare
o-nikolas
reviewed
Oct 21, 2026
o-nikolas
left a comment
Contributor
There was a problem hiding this comment.
There's another follow up coming for the AwsEksExecutor to make make use of this right?
Otherwise just an addition to one of vincent's comments
Contributor
Author
Correct, wanted to split up the |
seanghaeli
force-pushed
the
ghaeli/kubernetes-executor-team-clusters
branch
from
October 23, 2026 07:01
7408841 to
da531f5
Compare
1 task done
o-nikolas
reviewed
Oct 23, 2026
o-nikolas
left a comment
Contributor
There was a problem hiding this comment.
Just one small item, otherwise looks good!
In multi-team mode, a team's KubernetesExecutor read its pod settings from the team's config, but connected to the cluster set in the global [kubernetes_executor] section, so every team ran its pods on the same cluster. A client_factory could be set per team, but it was called without arguments, so it couldn't tell which team it was building a client for. A KubernetesExecutor subclass that builds its own client, such as the upcoming AwsEksExecutor, could only install its factory through [kubernetes_executor] client_factory. A plain KubernetesExecutor in the same scope then picked it up too and sent its pods to the subclass's cluster. airflow kubernetes cleanup-pods also only connected to the global cluster. It now takes --team, like generate-dag-yaml, and connects the way the team's executor does, with --executor to pick one when the team has more than one. It refuses a namespace that another team's KubernetesExecutor, or a global one, also uses, since it would delete their pods too. closes: apache#74844
seanghaeli
force-pushed
the
ghaeli/kubernetes-executor-team-clusters
branch
from
October 23, 2026 16:50
da531f5 to
53d6bcb
Compare
vincbeck
approved these changes
Oct 23, 2026
o-nikolas
approved these changes
Oct 23, 2026
1 task done
This was referenced Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In multi-team mode, a team's KubernetesExecutor reads its pod settings from the team's config, but it still connects with the global
[kubernetes_executor]settings, so every team ends up on the same cluster. The docs call this out today: "Teams share the cluster set in the global[aws_eks_executor]section". This PR reads the connection settings (in_cluster,config_file,cluster_context,verify_ssl,ssl_ca_cert,api_client_retry_configuration) from the team's config, passesteam_nameto aclient_factorythat accepts it, and lets a subclass likeAwsEksExecutorset its client factory on the class, so a KubernetesExecutor next to it keeps its own client. It also adds--teamtoairflow kubernetes cleanup-pods, which connects the way the team's executor does (--executorpicks one if the team has more than one) and refuses a namespace another team or the global executors also use. Teams that relied on the global connection settings now need to set them per team, which I noted in the changelog. I tested it with two teams on two real EKS clusters, and each team's pod now runs on its own cluster:closes: #74844
Docs
New "Connecting each team to its own cluster" section on the KubernetesExecutor page, including the line on the TCP keepalive settings
Changelog note for teams that relied on the global connection settings
Updated
client_factory/async_client_factorydescriptions in the config reference, and--teamonairflow kubernetes cleanup-podsin the CLI reference (only the changed entries shown)Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5.5) following the guidelines