-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[Docs][KubeRay] Add doc for kubectl plugin #47851
Open
MortalHappiness
wants to merge
4
commits into
ray-project:master
Choose a base branch
from
MortalHappiness:docs/#47849-kubectl-plugin
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+91
−0
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
3fa4a89
[Docs][KubeRay] Add doc for kubectl plugin
MortalHappiness 377401f
[Docs][kubectl-plugin] Address issue comments
MortalHappiness a641abf
Address issue comment: Remove ray job submit example
MortalHappiness e802c4b
Address issue comment: remove sentence
MortalHappiness File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89 changes: 89 additions & 0 deletions
89
doc/source/cluster/kubernetes/user-guides/kubectl-plugin.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
(kubectl-plugin)= | ||
|
||
# Use Kubectl Plugin (Alpha Feature) | ||
|
||
Starting from KubeRay v1.2.2, we have introduced a `kubectl ray` plugin to simplify common workflows when deploying Ray on Kubernetes. The plugin is designed to help users who are not familiar with Kubernetes to run Ray on Kubernetes with ease. | ||
|
||
## Installation | ||
|
||
Please follow the instructions in the [KubeRay Kubectl Plugin](https://github.com/ray-project/kuberay/tree/master/kubectl-plugin) to install the plugin. | ||
|
||
Currently, the recommended way to install the plugin is to download the binary from the [release page](https://github.com/ray-project/kuberay/releases) and add it to your PATH. | ||
|
||
For example, to install plugin version 1.2.2 on Linux amd64: | ||
|
||
```shell | ||
curl -LO https://github.com/ray-project/kuberay/releases/download/v1.2.2/kubectl-ray_v1.2.2_linux_amd64.tar.gz | ||
tar -xvf kubectl-ray_v1.2.2_linux_amd64.tar.gz | ||
cp kubectl-ray ~/.local/bin | ||
``` | ||
|
||
Replace `~/.local/bin` with the directory in your `PATH`. | ||
|
||
## Usage | ||
|
||
After installing the plugin, you can use `kubectl ray --help` to see the available commands and options. | ||
|
||
## Example | ||
|
||
Here assume you have a Ray cluster running on Kubernetes. Please see {ref}`RayCluster Quickstart <kuberay-raycluster-quickstart>` if you don't have a Ray cluster running on Kubernetes. | ||
|
||
### Get all Ray clusters | ||
|
||
```shell | ||
$ kubectl ray cluster get | ||
|
||
NAME NAMESPACE DESIRED WORKERS AVAILABLE WORKERS CPUS GPUS TPUS MEMORY AGE | ||
ray-cluster-kuberay default 1 2 0 0 3G 24s | ||
``` | ||
|
||
### Forward local ports to Ray cluster | ||
|
||
```shell | ||
$ kubectl ray session ray-cluster-kuberay | ||
|
||
Forwarding ports to service ray-cluster-kuberay-head-svc | ||
Ray Dashboard: http://localhost:8265 | ||
Ray Interactive Client: http://localhost:10001 | ||
|
||
Forwarding from 127.0.0.1:8265 -> 8265 | ||
Forwarding from [::1]:8265 -> 8265 | ||
Forwarding from 127.0.0.1:10001 -> 10001 | ||
Forwarding from [::1]:10001 -> 10001 | ||
``` | ||
|
||
### Get Ray cluster logs | ||
|
||
```shell | ||
$ kubectl ray log ray-cluster-kuberay | ||
|
||
No output directory specified, creating dir under current directory using cluster name. | ||
Downloading file ./ for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./old/ for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./gcs_server.out for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./gcs_server.err for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./events/ for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./events/event_GCS.log for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./events/event_AUTOSCALER.log for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./events/event_RAYLET.log for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./debug_state_gcs.txt for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./monitor.out for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./monitor.err for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./ray_client_server.out for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./ray_client_server.err for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./dashboard.err for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./dashboard.log for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./monitor.log for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./raylet.out for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./raylet.err for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./log_monitor.err for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./debug_state.txt for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./log_monitor.log for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./dashboard_agent.log for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./agent-424238335.out for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./agent-424238335.err for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./runtime_env_agent.out for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./runtime_env_agent.err for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./runtime_env_agent.log for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
Downloading file ./nsight/ for Ray Head ray-cluster-kuberay-head-qkrv8 | ||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We bundle the plugin binary into the KubeRay release now right? can we just download the bianry from the release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem. Let me create a PR in kuberay repo because the README.md is bundled into the tar file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue created: ray-project/kuberay#2449
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks I think we can directly add this part into this page too:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in f8a5a41