kind create cluster --image=kindest/node:v1.26.0 ../scripts/doctest-utils.sh install_kuberay_operator kubectl apply -f https://raw.githubusercontent.com/ray-project/kuberay/v1.3.0/ray-operator/config/samples/ray-job.sample.yaml kubectl wait --for=condition=RayClusterProvisioned raycluster/$(kubectl get rayjob rayjob-sample -o jsonpath='{.status.rayClusterName}') --timeout=500s kubectl wait --for=condition=ready pod -l job-name=rayjob-sample --timeout=500s # Step 4.1: List all RayJob custom resources in the `default` namespace. kubectl get rayjob # Step 4.2: List all RayCluster custom resources in the `default` namespace. kubectl get raycluster # Step 4.3: List all Pods in the `default` namespace. # The Pod created by the Kubernetes Job will be terminated after the Kubernetes Job finishes. kubectl get pods --sort-by='.metadata.creationTimestamp' kubectl wait --for=condition=complete job/rayjob-sample --timeout=500s # Step 4.4: Check the status of the RayJob. # The field `jobStatus` in the RayJob custom resource will be updated to `SUCCEEDED` and `jobDeploymentStatus` # should be `Complete` once the job finishes. kubectl get rayjobs.ray.io rayjob-sample -o jsonpath='{.status.jobStatus}' kubectl get rayjobs.ray.io rayjob-sample -o jsonpath='{.status.jobDeploymentStatus}' kubectl logs -l=job-name=rayjob-sample kubectl delete -f https://raw.githubusercontent.com/ray-project/kuberay/v1.3.0/ray-operator/config/samples/ray-job.sample.yaml kubectl apply -f https://raw.githubusercontent.com/ray-project/kuberay/v1.3.0/ray-operator/config/samples/ray-job.shutdown.yaml kubectl wait --for=condition=RayClusterProvisioned raycluster/$(kubectl get rayjob rayjob-sample-shutdown -o jsonpath='{.status.rayClusterName}') --timeout=500s kubectl wait --for=condition=complete job/rayjob-sample-shutdown --timeout=500s # Wait until `jobStatus` is `SUCCEEDED` and `jobDeploymentStatus` is `Complete`. kubectl get rayjobs.ray.io rayjob-sample-shutdown -o jsonpath='{.status.jobDeploymentStatus}' kubectl get rayjobs.ray.io rayjob-sample-shutdown -o jsonpath='{.status.jobStatus}' # List the RayCluster custom resources in the `default` namespace. The RayCluster # associated with the RayJob `rayjob-sample-shutdown` should be deleted. kubectl get raycluster kind delete cluster