Skip to content

Commit 3a6eb90

Browse files
authored
[doc][kuberay] mention scale command (#52222)
with an example closes ray-project/kuberay#3190 Signed-off-by: David Xia <david@davidxia.com>
1 parent 979e0b6 commit 3a6eb90

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

doc/source/cluster/kubernetes/user-guides/kubectl-plugin.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ $ kubectl ray create workergroup example-group --ray-cluster raycluster-sample -
8181
You can use `kubectl ray get cluster`, `kubectl ray get workergroup`, and `kubectl ray get node` to get the status of RayClusters, worker groups, and Ray nodes, respectively.
8282

8383
```text
84-
$ kubectl ray get cluster
84+
$ kubectl ray get cluster
8585
NAME NAMESPACE DESIRED WORKERS AVAILABLE WORKERS CPUS GPUS TPUS MEMORY AGE
8686
raycluster-sample default 2 2 6 0 0 13Gi 3m56s
8787
raycluster-sample-2 default 2 2 6 0 0 12Gi 3m51s
@@ -102,6 +102,20 @@ raycluster-sample-2-default-group-vnkkc 2 0 0 4Gi rayclu
102102
raycluster-sample-2-head-pwsrm 2 0 0 4Gi raycluster-sample-2 head headgroup 3m51s
103103
```
104104

105+
You can scale a cluster's worker group like so.
106+
107+
```shell
108+
$ kubectl ray scale cluster raycluster-sample \
109+
--worker-group default-group \
110+
--replicas 2
111+
Scaled worker group default-group in Ray cluster raycluster-sample in namespace default from 1 to 2 replicas
112+
113+
# verify the worker group scaled up
114+
$ kubectl ray get workergroup default-group --ray-cluster raycluster-sample
115+
NAME REPLICAS CPUS GPUS TPUS MEMORY CLUSTER
116+
default-group 2/2 4 0 0 8Gi raycluster-sample
117+
```
118+
105119
The `kubectl ray session` command can forward local ports to Ray resources, allowing users to avoid remembering which ports Ray resources exposes.
106120

107121
```text
@@ -172,7 +186,7 @@ Submitted RayJob rayjob-sample.
172186
Waiting for RayCluster
173187
...
174188
2025-01-06 11:53:34,806 INFO worker.py:1634 -- Connecting to existing Ray cluster at address: 10.12.0.9:6379...
175-
2025-01-06 11:53:34,814 INFO worker.py:1810 -- Connected to Ray cluster. View the dashboard at 10.12.0.9:8265
189+
2025-01-06 11:53:34,814 INFO worker.py:1810 -- Connected to Ray cluster. View the dashboard at 10.12.0.9:8265
176190
[0, 1, 4, 9]
177191
2025-01-06 11:53:38,368 SUCC cli.py:63 -- ------------------------------------------
178192
2025-01-06 11:53:38,368 SUCC cli.py:64 -- Job 'raysubmit_9NfCvwcmcyMNFCvX' succeeded
@@ -193,7 +207,7 @@ Submitted RayJob rayjob-interactive-mode.
193207
Waiting for RayCluster
194208
...
195209
2025-01-06 12:44:43,542 INFO worker.py:1634 -- Connecting to existing Ray cluster at address: 10.12.0.10:6379...
196-
2025-01-06 12:44:43,551 INFO worker.py:1810 -- Connected to Ray cluster. View the dashboard at 10.12.0.10:8265
210+
2025-01-06 12:44:43,551 INFO worker.py:1810 -- Connected to Ray cluster. View the dashboard at 10.12.0.10:8265
197211
[0, 1, 4, 9]
198212
2025-01-06 12:44:47,830 SUCC cli.py:63 -- ------------------------------------------
199213
2025-01-06 12:44:47,830 SUCC cli.py:64 -- Job 'raysubmit_fuBdjGnecFggejhR' succeeded

0 commit comments

Comments
 (0)