flyte icon indicating copy to clipboard operation
flyte copied to clipboard

[Plugin] Multikueue (Kueue)

Open Ryang20718 opened this issue 4 months ago • 5 comments

Kueue is a kubernetes controller with custom objects that allows federated cluster scheduling of workloads. It supports resource aware scheduling, prioritization, and multi-cluster shceduling, etc. I propose to add kueue (specifically multikueue) features as a plugin.

I haven't written a plugin for flyte, but am happy to write this. Wanted to create an issue to float this idea before jumping straight in!

Ryang20718 avatar Jul 20 '26 21:07 Ryang20718

Flyte supports extensibility via task plugins, including backend plugins that can integrate with external systems or Kubernetes operators. However, there is no mention in the provided data sources of an existing Flyte plugin for Kueue or Multikueue. You can propose and implement such a plugin, either as a Flytekit-only (Python SDK) plugin or as a backend plugin for deeper integration. The process for proposing and tracking new plugins is documented, and backend plugins can be implemented as web services (e.g., using FastAPI) that Flyte communicates with for job creation and status polling. See the backend plugin RFC and plugin request template for guidance on contributing a new plugin and the architectural approach for backend plugins.

Would you like more detail on how to get started with writing a Flyte backend plugin or on the plugin proposal process?

Sources:


This is an AI-generated response and your feedback is appreciated! Please leave a 👍 if this is helpful and 👎 if it is not.

Mention @herald to ask follow-up questions. See runllm.com for more!

runllm avatar Jul 20 '26 21:07 runllm

@Ryang20718 Thanks for the proposal!

  1. Do you have an idea of what we need to add in order to integrate with Kueue?
  2. Are you planning to use Kueue with other Flyte plugins? Or just plain flyte task?

machichima avatar Jul 21 '26 03:07 machichima

@Ryang20718 I use kueue with flyte and basically you just need to add the kueue labels to the tasks and it magically works. There are a couple pain points that maybe a plugin could help with:

  • I am adding kueue labels directly to the pod template which I think a plugin could help make the labeling on the python side more sane.
  • I am manually adding labels so the kueue can match the workfload to the correct flavor. I know flyte has like accelerator names - I just haven't used them yet. But it would be cool if there was some way to inform my Kueue hlem chart and node pools labels.

evan-sadler avatar Jul 21 '26 20:07 evan-sadler

I was taking a look at https://github.com/flyteorg/flyte/blob/main/flyteplugins/go/tasks/pluginmachinery/flytek8s/plugin_exec_context.go

I think we can start with adding labels to pods for now. We currently also submit Jobs/Jobsets to kueue as well. (I believe those aren't supported plugins at the moment)?

Ryang20718 avatar Jul 21 '26 22:07 Ryang20718

@Ryang20718 Yes we can start with adding labels, please let us know how are you gonna implement this. We support Jobsets in SDK now but do not have integration with kueue too, we can do that too.

popojk avatar Jul 22 '26 06:07 popojk