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

Kueue multipod #3543

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open

Kueue multipod #3543

wants to merge 21 commits into from

Conversation

asaiacai
Copy link
Contributor

@asaiacai asaiacai commented May 12, 2024

This integrates kueue for multipod/node workloads. Previously triggering kueue to manage skypilot pods by including kueue.x-k8s.io/queue-name: user-queue under resource labels was causing kueue to recognize each pod as a distinct workload. This adds the additional required kueue labels/annotations anytime kueue.x-k8s.io/queue-name is included as part of a k8s skypilot Task so a multinode job registers as a single workload under kueue as well as performing sanity checks to ensure the user specified queues and priorities exist in the k8s cluster.

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Manually test multinode skypilot task appears as a single workload under kueue (on GKE)
# setup kueue
kubectl apply -f --server-side tests/kubernetes/kueue-manifest.yaml
kubectl apply -f tests/kubernetes/kueue-single-clusterqueue.yaml
# launch skypilot task
sky launch  -c multikueue -d sky-kueue-multinode.yaml
# list kueue workloads
kubectl get workloads
# down task
sky down multikueue
# check workload is deleted
kubectl get workloads

sky-kueue-multinode.yaml

resources:
  cloud: kubernetes
  labels:
    kueue.x-k8s.io/queue-name: user-queue
    kueue.x-k8s.io/priority-class: low-priority  

num_nodes: 2

run: |
  for i in {1..10000}; do
    echo "$i"
    sleep 1
  done 

@asaiacai asaiacai marked this pull request as ready for review May 13, 2024 08:31
@alculquicondor
Copy link

Hi folks, Kueue maintainer here.

I would love to learn more about skypilot and how we can best align our projects in the future. If anyone interested in the topic has some time, I would welcome you to present in a Kubernetes WG Batch meeting to learn about this system and the current challenges you face with Kueue, if any.

You can find details about the meeting here https://github.com/kubernetes/community/tree/master/wg-batch

@alculquicondor
Copy link

Btw, we also maintain the K8s job-controller and jobset, which are the recommended way of creating groups of pods. It's a better pattern than plain pods.

@romilbhardwaj
Copy link
Collaborator

Hey @alculquicondor - thanks for your interest! I've added SkyPilot to the future agenda for wg-batch meetings - let me know if 6th June works.

we also maintain the K8s job-controller and jobset, which are the recommended way of creating groups of pods. It's a better pattern than plain pods.

We've looked into jobset/job-controller, but concluded plain pods are the best way to implement the SkyPilot cluster abstraction since lifecycle management is done by the SkyPilot control plane:

  • SkyPilot "clusters" do not have a fixed lifecycle like jobs do. E.g., even if the task terminates, a SkyPilot cluster still stays up and can have more tasks queued to it by users.
  • Deployments are closer to what we want, but SkyPilot currently cannot handle automatic pod restarts.
  • As a result, plain pods + no lifecycle management from k8s is what we built.

That said, we're open to other ideas and suggestions!

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

Successfully merging this pull request may close these issues.

None yet

3 participants