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 update
Update the values.yaml
to override the default settings. For example, update the requests
section:
requests: cpu: 100m memory: 512Mi
If this is a new installation, install both the CRDs and the KubeRay operator:
helm install kuberay-operator kuberay/kuberay-operator -f values.yaml -n ray
If 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 ray
To confirm that the operator is running, check the pods:
kubectl get pods
A kuberay-operator-
pod should appear, as shown below:
# NAME READY STATUS RESTARTS AGE# kuberay-operator-5bc8dbcfb-wddp8 1/1 Running 3 (130m ago) 138m
Allow 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 - delete
Cleaning Up KubeRay Operator
To uninstall the KubeRay Operator, run the following command:
helm uninstall kuberay-operator# release "kuberay-operator" uninstalled
It may take a few seconds for the KubeRay Operator pod to terminate. Confirm that the pods are gone by running:
kubectl get pods