KubeRay operator

Deploy the KubeRay operator with the Helm chart repository in ray namespace. If you don't have helm on your local computer, install helm first.

helm repo add kuberay https://ray-project.github.io/kuberay-helm/
helm repo update
Update the values.yaml to overwrite default settings, for example, update the requests section:
  requests:
     cpu: 100m
     memory: 512Mi
If it's the initial installation, install both CRDs and KubeRay operator.
helm install kuberay-operator kuberay/kuberay-operator -f values.yaml -n ray
If it's an upgrade to the existing installation, run the following command to upgrade:
helm upgrade --install kuberay-operator kuberay/kuberay-operator -f values.yaml -n ray
Confirm that the operator is running:
kubectl get pods
A kuberay-operator- pod should be listed like shown below:
# NAME                                          READY   STATUS    RESTARTS       AGE
# kuberay-operator-5bc8dbcfb-wddp8              1/1     Running   3 (130m ago)   138m

To allow other namespaces to create Ray resources, run kubectl edit clusterrole kubeless-user and add the below section:

- apiGroups:
  - ray.io
  resources:
  - rayjobs
  - rayservices
  - rayclusters
  verbs:
  - list
  - watch
  - get
  - update
  - delete

To clean up KubeRay Operator, uninstall the helm chart:

# Uninstall the KubeRay operator Helm chart
helm uninstall kuberay-operator
# release "kuberay-operator" uninstalled
It might take several seconds for the KubeRay Operator pod to terminate. Confirm that the pods are gone by running:
kubectl get pods