This document explains how to manage and interact with RayJob using KubeRay APIServer. See this guide for more details.
This step creates a local Kubernetes cluster using Kind. If you already have a Kubernetes cluster, you can skip this step.
kind create cluster --image=kindest/node:v1.29.0Follow the Installation Guide to install the latest stable KubeRay operator and APIServer (without the security proxy) from the Helm repository, and port-forward the HTTP endpoint to local port 31888.
Once the KubeRay operator is running, we can install a RayJob through APIServer with
following command. This will create a RayJob named rayjob-interactive-mode:
curl -s https://raw.githubusercontent.com/ray-project/kuberay/master/ray-operator/config/samples/ray-job.interactive-mode.yaml \
| curl -X POST http://localhost:31888/apis/ray.io/v1/namespaces/default/rayjobs \
-H "Content-Type: application/yaml" \
--data-binary @-You can check the detail of the submitted RayJob by executing following command:
curl -s http://localhost:31888/apis/ray.io/v1/namespaces/default/rayjobs/rayjob-interactive-modeTo delete the RayJob with KubeRay APIServer, execute the following command. The rayjob-interactive-mode is the name of
the RayJob we created.
curl -X DELETE 'localhost:31888/apis/ray.io/v1/namespaces/default/rayjobs/rayjob-interactive-mode'You can then verify if the RayJob is removed. The following command should return 404:
curl -s http://localhost:31888/apis/ray.io/v1/namespaces/default/rayjobs/rayjob-interactive-modekind delete cluster