|
2 | 2 |
|
3 | 3 | Kubectl plugin/extension for Kuberay CLI that provides the ability to manage ray resources.
|
4 | 4 |
|
5 |
| -## Installation |
6 |
| - |
7 |
| -<!-- 1. Check [release page](https://github.com/ray-project/kuberay/releases) and download the necessary binaries. --> |
8 |
| -1. Run `go build cmd/kubectl-ray.go` |
9 |
| -2. Move the binary, which will be named `kubectl-ray` to your `PATH` |
10 |
| - |
11 | 5 | ## Prerequisites
|
12 | 6 |
|
13 | 7 | 1. Make sure there is a Kubernetes cluster running with KubeRay installed.
|
14 | 8 | 2. Make sure `kubectl` has the right context.
|
15 | 9 |
|
16 |
| -## Usage |
17 |
| - |
18 |
| -### Retrieve Ray Clusters |
19 |
| - |
20 |
| - Usage: |
21 |
| - ray cluster get [flags] |
22 |
| - |
23 |
| - Aliases: |
24 |
| - get, list |
25 |
| - |
26 |
| - Description: |
27 |
| - Retrieves the ray cluster information. |
| 10 | +## Installation |
28 | 11 |
|
29 |
| - ``` |
30 |
| - $ kubectl ray cluster get |
31 |
| - NAME NAMESPACE DESIRED WORKERS AVAILABLE WORKERS CPUS GPUS TPUS MEMORY AGE |
32 |
| - random-kuberay-cluster default 1 1 5 1 0 24Gi 13d |
33 |
| - ``` |
| 12 | +### Compiling from source |
34 | 13 |
|
35 |
| -### Retrieve Ray Cluster Head Logs |
| 14 | +1. Run `go build cmd/kubectl-ray.go` |
| 15 | +2. Move the binary, which will be named `kubectl-ray` to your `PATH` |
36 | 16 |
|
37 |
| - Usage: |
38 |
| - log (RAY_CLUSTER_NAME) [--out-dir directory] [--node-type all|head|worker] |
39 |
| - **Currently only `head` is supported** |
| 17 | +### Using Krew |
40 | 18 |
|
41 |
| - Aliases: |
42 |
| - log, logs |
| 19 | +1. Install [Krew](https://krew.sigs.k8s.io/docs/user-guide/setup/install/). |
| 20 | +2. (TODO: Replace this step with the installation command). |
43 | 21 |
|
44 |
| - Description: |
45 |
| - Retrieves ray cluster head pod logs and all the logs under `/tmp/ray/session_latest/logs/` |
| 22 | +## Shell Completion |
46 | 23 |
|
47 |
| - ``` |
48 |
| - $ kubectl ray cluster logs --out-dir temp-dir |
49 |
| - ... |
50 |
| - $ ls temp-dir/ |
51 |
| - stable-diffusion-cluster-head-hqcxt |
52 |
| - $ ls temp-dir/stable-diffusion-cluster-head-hqcxt |
53 |
| - agent-424238335.err dashboard_agent.log gcs_server.err monitor.err old raylet.out stdout.log |
54 |
| - agent-424238335.out debug_state.txt gcs_server.out monitor.log ray_client_server.err runtime_env_agent.err |
55 |
| - dashboard.err debug_state_gcs.txt log_monitor.err monitor.out ray_client_server.out runtime_env_agent.log |
56 |
| - dashboard.log events log_monitor.log nsight raylet.err runtime_env_agent.out |
57 |
| - ``` |
| 24 | +1. Install [kubectl plugin-completion](https://github.com/marckhouzam/kubectl-plugin_completion) plugin. |
| 25 | +2. Run `kubectl plugin-completion generate`. |
| 26 | +3. Add `$HOME/.kubectl-plugin-completion` to `PATH` in your shell profile. |
0 commit comments