-
Notifications
You must be signed in to change notification settings - Fork 479
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
[Feature] Add kubectl plugin to help scale ray raycluster #110
Comments
yes good idea. I guess we would also need to specify the CR instance name for the raycluster. kubectl ray scale |
Or we want user only use |
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. |
I'm wonder if this functionality can be included in Kuberay CLI? So users don't need to rely on |
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 |
Is anyone working on this? Happy to contribute a PR if the CLI interface has been decided. |
to scale a RayCluster's worker group. contributes to ray-project#110 Signed-off-by: David Xia <[email protected]>
to scale a RayCluster's worker group. contributes to ray-project#110 Signed-off-by: David Xia <[email protected]>
to scale a RayCluster's worker group. contributes to ray-project#110 Signed-off-by: David Xia <[email protected]>
to scale a RayCluster's worker group. contributes to ray-project#110 ## Example Usage ```console $ kubectl ray scale -n hyperkube default-group -c NONEXISTENT -r 0 Error: failed to scale worker group default-group in Ray cluster dxia-testsd in namespace hyperkube: rayclusters.ray.io "NONEXISTENT" not found $ kubectl ray scale -n hyperkube DEADBEEF -c dxia-test -r 1 Error: worker group DEADBEEF not found in Ray cluster dxia-test in namespace hyperkube. Available worker groups: default-group, another-group, yet-another-group $ kubectl ray scale -n hyperkube default-group -c dxia-test -r 3 Scaled worker group default-group in Ray cluster dxia-test in namespace hyperkube from 0 to 3 replicas $ kubectl ray scale -n hyperkube default-group -c dxia-test -r 1 Scaled worker group default-group in Ray cluster dxia-test in namespace hyperkube from 3 to 1 replicas $ kubectl ray scale -n hyperkube default-group -c dxia-test -r -1 Error: must specify -r/--replicas with a non-negative integer ``` Signed-off-by: David Xia <[email protected]>
to scale a RayCluster's worker group. contributes to ray-project#110 ## Example Usage ```console $ kubectl ray scale default-group --ray-cluster NONEXISTENT --replicas 0 Error: failed to scale worker group default-group in Ray cluster NONEXISTENT in namespace default: rayclusters.ray.io "NONEXISTENT" not found $ kubectl ray scale DEADBEEF --ray-cluster dxia-test --replicas 1 Error: worker group DEADBEEF not found in Ray cluster dxia-test in namespace default. Available worker groups: default-group, another-group, yet-another-group $ kubectl ray scale default-group --ray-cluster dxia-test --replicas 3 Scaled worker group default-group in Ray cluster dxia-test in namespace default from 0 to 3 replicas $ kubectl ray scale default-group --ray-cluster dxia-test --replicas 1 Scaled worker group default-group in Ray cluster dxia-test in namespace default from 3 to 1 replicas $ kubectl ray scale default-group --ray-cluster dxia-test --replicas -1 Error: must specify -r/--replicas with a non-negative integer ``` Signed-off-by: David Xia <[email protected]>
to scale a RayCluster's worker group. closes ray-project#110 ## Example Usage ```console $ kubectl ray scale default-group --ray-cluster NONEXISTENT --replicas 0 Error: failed to scale worker group default-group in Ray cluster NONEXISTENT in namespace default: rayclusters.ray.io "NONEXISTENT" not found $ kubectl ray scale DEADBEEF --ray-cluster dxia-test --replicas 1 Error: worker group DEADBEEF not found in Ray cluster dxia-test in namespace default. Available worker groups: default-group, another-group, yet-another-group $ kubectl ray scale default-group --ray-cluster dxia-test --replicas 3 Scaled worker group default-group in Ray cluster dxia-test in namespace default from 0 to 3 replicas $ kubectl ray scale default-group --ray-cluster dxia-test --replicas 1 Scaled worker group default-group in Ray cluster dxia-test in namespace default from 3 to 1 replicas $ kubectl ray scale default-group --ray-cluster dxia-test --replicas -1 Error: must specify -r/--replicas with a non-negative integer ``` Signed-off-by: David Xia <[email protected]>
to scale a RayCluster's worker group. closes ray-project#110 ## Example Usage ```console $ kubectl ray scale cluster -h (base) Scale a Ray cluster's worker group. Usage: ray scale cluster (WORKERGROUP) (-c/--ray-cluster RAYCLUSTER) (-r/--replicas N) [flags] Examples: # Scale a Ray cluster's worker group to 3 replicas kubectl ray scale cluster my-workergroup --ray-cluster my-raycluster --replicas 3 $ kubectl ray scale default-group --ray-cluster NONEXISTENT --replicas 0 Error: failed to scale worker group default-group in Ray cluster NONEXISTENT in namespace default: rayclusters.ray.io "NONEXISTENT" not found $ kubectl ray scale DEADBEEF --ray-cluster dxia-test --replicas 1 Error: worker group DEADBEEF not found in Ray cluster dxia-test in namespace default. Available worker groups: default-group, another-group, yet-another-group $ kubectl ray scale default-group --ray-cluster dxia-test --replicas 3 Scaled worker group default-group in Ray cluster dxia-test in namespace default from 0 to 3 replicas $ kubectl ray scale default-group --ray-cluster dxia-test --replicas 1 Scaled worker group default-group in Ray cluster dxia-test in namespace default from 3 to 1 replicas $ kubectl ray scale default-group --ray-cluster dxia-test --replicas -1 Error: must specify -r/--replicas with a non-negative integer ``` Signed-off-by: David Xia <[email protected]>
to scale a RayCluster's worker group. closes ray-project#110 ## Example Usage ```console $ kubectl ray scale cluster -h (base) Scale a Ray cluster's worker group. Usage: ray scale cluster (WORKERGROUP) (-c/--ray-cluster RAYCLUSTER) (-r/--replicas N) [flags] Examples: # Scale a Ray cluster's worker group to 3 replicas kubectl ray scale cluster my-workergroup --ray-cluster my-raycluster --replicas 3 $ kubectl ray scale default-group --ray-cluster NONEXISTENT --replicas 0 Error: failed to scale worker group default-group in Ray cluster NONEXISTENT in namespace default: rayclusters.ray.io "NONEXISTENT" not found $ kubectl ray scale DEADBEEF --ray-cluster dxia-test --replicas 1 Error: worker group DEADBEEF not found in Ray cluster dxia-test in namespace default. Available worker groups: default-group, another-group, yet-another-group $ kubectl ray scale default-group --ray-cluster dxia-test --replicas 3 Scaled worker group default-group in Ray cluster dxia-test in namespace default from 0 to 3 replicas $ kubectl ray scale default-group --ray-cluster dxia-test --replicas 1 Scaled worker group default-group in Ray cluster dxia-test in namespace default from 3 to 1 replicas $ kubectl ray scale default-group --ray-cluster dxia-test --replicas -1 Error: must specify -r/--replicas with a non-negative integer ``` Signed-off-by: David Xia <[email protected]>
Search before asking
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 addScaleStrategy
in the CRD. It is a little complicated.We can create a kubectl plugin to simplify the way.
@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?
The text was updated successfully, but these errors were encountered: