KubeRay Operator Installation and Management
Deploying the KubeRay Operator
Deploy the KubeRay operator in the ray namespace using the Helm chart repository. If you don’t have helm installed, install Helm first.
helm repo add kuberay https://ray-project.github.io/kuberay-helm/helm repo updateUpdate the values.yaml to override the default settings. For example, update the requests section:
requests: cpu: 100m memory: 512MiIf this is a new installation, install both the CRDs and the KubeRay operator:
helm install kuberay-operator kuberay/kuberay-operator -f values.yaml -n rayIf this is an upgrade to an existing installation, use the following command to upgrade:
helm upgrade --install kuberay-operator kuberay/kuberay-operator -f values.yaml -n rayTo confirm that the operator is running, check the pods:
kubectl get podsA kuberay-operator- pod should appear, as shown below:
# NAME READY STATUS RESTARTS AGE# kuberay-operator-5bc8dbcfb-wddp8 1/1 Running 3 (130m ago) 138mAllow Other Namespaces to Create Ray Resources
To allow other namespaces to create Ray resources, run kubectl edit clusterrole kubeless-user and add the following section:
- apiGroups: - ray.io resources: - rayjobs - rayservices - rayclusters verbs: - list - watch - get - update - deleteCleaning Up KubeRay Operator
To uninstall the KubeRay Operator, run the following command:
helm uninstall kuberay-operator# release "kuberay-operator" uninstalledIt may take a few seconds for the KubeRay Operator pod to terminate. Confirm that the pods are gone by running:
kubectl get pods