kuberay icon indicating copy to clipboard operation
kuberay copied to clipboard

[Feature] Add kubectl plugin to help scale ray raycluster

Open chenk008 opened this issue 3 years ago • 5 comments

Search before asking

  • [X] I had searched in the issues and found no similar feature requirement.

Description

When we want to scale out/shrink a ray cluster, we use kubectl edit raycluster xxx to edit the raycluster. Especially in shrinking, we have to add ScaleStrategy in the CRD. It is a little complicated.

We can create a kubectl plugin to simplify the way.

kubectl ray scale $groupName $replica
kubectl ray shrink $groupName $delete-podname-0 $delete-podname-1

@Jeffwan @akanso WDYT?

Use case

A kubectl plugin to help user to scale out/shrink easily.

Related issues

No response

Are you willing to submit a PR?

  • [x] Yes I am willing to submit a PR!

chenk008 avatar Dec 08 '21 06:12 chenk008

yes good idea. I guess we would also need to specify the CR instance name for the raycluster.

kubectl ray scale $raycluster $groupName $replica

akanso avatar Dec 08 '21 15:12 akanso

kubectl ray scale $raycluster $groupName $replica I assume this would be used for both scale out and scale in? and shrink is used for fine grain control?

Or we want user only use shrink to scale in the cluster?

Jeffwan avatar Jan 12 '22 02:01 Jeffwan

I guess scaling down might require an optional flag, which is the name of the pod to scale down. Because in certain situations we cannot take down a random pod, it needs to be an idle one.

akanso avatar Jan 13 '22 18:01 akanso

I'm wonder if this functionality can be included in Kuberay CLI? So users don't need to rely on kubectl (another CLI) to interact with the Ray clusters.

daikeshi avatar May 02 '22 02:05 daikeshi

I didn't know this issue existed, but here's a proposal on this idea https://docs.google.com/document/d/1msUpb59QBE9ypc1fLy7Od2FsZOzgRgMkPOJG7xHN1UU/edit?usp=sharing&resourcekey=0-G216URZBuFHOjvgcznRaAQ

@kevin85421 and I discussed this earlier this week. I plan to put together a PR for the initial version soon

andrewsykim avatar May 02 '24 03:05 andrewsykim