Skip to content

[Feat][kubectl-plugin] Config file for creating RayClusters #3142

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

Closed
MortalHappiness opened this issue Mar 3, 2025 · 5 comments · Fixed by #3225
Closed

[Feat][kubectl-plugin] Config file for creating RayClusters #3142

MortalHappiness opened this issue Mar 3, 2025 · 5 comments · Fixed by #3225
Assignees
Labels
1.4.0 cli kubectl plugin P0 Critical issue that should be fixed ASAP

Comments

@MortalHappiness
Copy link
Member

MortalHappiness commented Mar 3, 2025

As we support more use-cases for cluster creation, it won’t scale to add CLI flags for every possible permutation of RayClusters. We should consider supporting config files (in YAML) to capture high-level parameters for cluster creation. The challenge here is designing config files that are significantly simpler than writing RayCluster YAML directly without sacrificing too much utility. One consideration would be to use a similar format as the existing values.yaml for the Ray Cluster helm chart.

Possible Config

context: CURRENT_CONTEXT
namespace: [none]

labels: {}
annotations: [}

ray-version: CURRENT_VERSION
image: rayproject/ray:CURRENT_VERSION

head-cpu: 2
head-memory: 4Gi
head-gpu: 0
head-ray-start-params: {}

worker-groups:
- name: worker
  worker-replicas: 1
  worker-cpu: 2
  worker-memory: 4Gi
  worker-gpu: 0
  worker-ray-start-params: {}

dry-run: false
wait: false
timeout: 5m

gke:
  # GCS bucket volume mount
  gcsfuse:
    bucket0name: my-bucket
    # optional mount options
    mount-options: implicit-dirs,uid=1000,gid=100
    # optional mount path that defaults to /mnt/gcs-data
    # the bucket will be mounted at /mnt/gcs-data on both head and worker nodes
    mount-path: /mnt/gcs-data
    # optional resource configs for gcsfuse sidecar container
    resources:
      cpus: 250m
      memory: 256Mi
      ephemeral-storage: 5Gi

eks: {}

Example command

kubectl ray create cluster (NAME) --cluster-config <path-to-config>

Discussion

Isn't this somewhat redundant with helm install raycluster? After all, helm template can achieve a similar outcome.

@MortalHappiness MortalHappiness added 1.4.0 cli kubectl plugin labels Mar 3, 2025
@kevin85421 kevin85421 added the P0 Critical issue that should be fixed ASAP label Mar 3, 2025
@kevin85421
Copy link
Member

/assign @davidxia

@davidxia
Copy link
Contributor

looks like the assignment command isn't working?

@davidxia
Copy link
Contributor

I've also updated the schema based on preliminary feedback in #3225.

@davidxia
Copy link
Contributor

Isn't this somewhat redundant with helm install raycluster? After all, helm template can achieve a similar outcome.

I just saw this. Here's my initial thoughts.

  • Some users may not be able to or want to use helm. At Spotify Helm usage isn't well supported or common at Spotify.
  • Helm might not abstract K8s away enough for some users. The RayCluster K8s YAML is still created and used.
  • We can create integrations for and abstract away more things like GCS Fuse (see the example in the PR description) that helm cannot. With helm, users still have to understand all the key-values they need to set with helm --set key=value which requires both an understanding of where to change RayCluster YAML and finding the right helm key to set.

@kevin85421
Copy link
Member

@davidxia I can only assign the issue to you when you comment on the issue haha

davidxia added a commit to davidxia/kuberay that referenced this issue Apr 2, 2025
davidxia added a commit to davidxia/kuberay that referenced this issue Apr 2, 2025
davidxia added a commit to davidxia/kuberay that referenced this issue Apr 7, 2025
davidxia added a commit to davidxia/kuberay that referenced this issue Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.4.0 cli kubectl plugin P0 Critical issue that should be fixed ASAP
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants