KubeRay: Running Ray Workloads on Kubernetes with Operator-Managed Custom Resources
Project brief: A toolkit to run Ray applications on Kubernetes. Kubectl Plugin (Beta): Starting from KubeRay v1.3.0, you can use the kubectl ray plugin to simplify common workflows when deploying Ray on Kubernetes.
At a glance
- What is it?
- KubeRay is a Kubernetes operator that manages RayClusters, RayJobs, and RayServices. It brings Ray's distributed computing model to Kubernetes, but its complexity and evolving components require careful evaluation before adoption.
- Who is it for?
- Adopt KubeRay if you are already committed to Ray and need a Kubernetes-native way to manage Ray clusters, jobs, and Serve deployments. It is the most direct path for teams that want to move from manual Ray cluster management to operator-based lifecycle control.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository received new commits within the last day.
- What is it written in?
- Mainly Go, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
What KubeRay Actually Solves
KubeRay is a Kubernetes operator that manages Ray applications. Ray is a distributed computing framework for Python and other languages, but running Ray on Kubernetes without a controller means manually creating pods, services, and configs. KubeRay replaces that with three custom resource definitions: RayCluster, RayJob, and RayService. The intended user is a platform engineer or ML infrastructure team that already uses Ray and wants Kubernetes to handle cluster lifecycle. The README says KubeRay fully manages RayCluster lifecycle, including creation, deletion, autoscaling, and fault tolerance. That is the core value: you declare a Ray cluster as a Kubernetes object, and the operator makes it real.
The Three Custom Resources and How They Differ
RayCluster is the base resource. It defines a head pod and worker pods, with optional autoscaling. RayJob wraps a RayCluster and submits a job when the cluster is ready. It can also delete the cluster after the job finishes, which is useful for batch workloads that do not need a persistent cluster. RayService combines a RayCluster with a Ray Serve deployment graph, and it offers zero-downtime upgrades and high availability. That makes RayService the right choice for serving workloads, but it is also the most complex resource. The README does not detail the internal reconciliation loops, but the separation of concerns is clear: cluster, job, and serving are distinct objects, each with its own lifecycle semantics. This is a design that mirrors Kubernetes patterns, but it also means you need to learn three resource types instead of one.
Getting Started: Installation and the kubectl Plugin
The README points to the Ray documentation for quick starts, which means installation commands are not in this file. However, the repository mentions a kubectl plugin introduced in v1.3.0. The plugin is called `kubectl ray` and is meant to simplify common workflows for users who are not familiar with Kubernetes. That is a significant usability layer: instead of writing YAML for RayCluster, RayJob, or RayService, you might be able to use imperative commands. The README gives no example commands, so you must consult the linked kubectl-plugin guide. The plugin is still Beta, which means its API could change. For a production rollout, you should pin a specific KubeRay version and test the plugin commands against your cluster before relying on them.
Where KubeRay Fits in the Kubernetes Ecosystem
KubeRay does not exist in a vacuum. The README lists integrations with observability tools like Prometheus and Grafana, queuing systems like Volcano, Apache YuniKorn, and Kueue, and ingress controllers like Nginx. That means you can plug KubeRay into an existing Kubernetes stack. For example, if you already use Kueue for quota management, KubeRay can work with it to schedule RayJobs. This is a practical advantage for platform teams that want a unified control plane. However, each integration adds configuration surface and potential failure points. The README does not specify which integrations are stable or how they interact with the operator's autoscaling. You will need to read the ecosystem documentation to understand the exact mechanics.
Limitations and Failure Modes
The most obvious limitation is that several components are not production-ready. The kubectl plugin is Beta, the APIServer is Alpha, and the dashboard is Experimental. That means you can use them, but you should not build a critical workflow on them without testing. The APIServer, for example, is described as being used internally by some organizations to back user interfaces. That is a narrow use case, and Alpha status implies breaking changes are likely. Another limitation is that KubeRay is tightly coupled to Ray. If you do not use Ray, this operator is useless. Even if you use Ray, the operator adds a layer of abstraction that can hide what is happening inside the cluster. When a RayJob fails, you have to debug both the Ray job and the Kubernetes resources. The README does not describe failure modes, but the complexity of RayService with zero-downtime upgrades suggests that misconfiguration could lead to subtle serving issues.
Alternatives: The Operator Approach vs. Native Kubernetes
The main alternative is to run Ray on Kubernetes without a dedicated operator. You could use a plain Kubernetes Deployment for the head node and a StatefulSet or Deployment for workers, and then submit jobs via a Kubernetes Job. That approach gives you full control but requires you to manually handle autoscaling, fault tolerance, and upgrades. Another alternative is to use a general-purpose job scheduler like Kueue, which the README lists as an integration. Kueue manages quotas and queueing but does not understand Ray's head-worker architecture. The difference is that KubeRay encodes Ray-specific knowledge into the operator, whereas Kueue remains generic. If you want Ray-specific lifecycle management, KubeRay is the tool. If you just need to run a Python script on a cluster, a Kubernetes Job might be simpler and more maintainable.
Maintenance and License Considerations
KubeRay is written in Go and licensed under Apache-2.0. That is a permissive license, so you can use it in commercial products without copyleft obligations. The repository is actively maintained, with releases as recent as v1.7.0 in August 2026. The release cadence suggests regular updates, but that also means you must track new versions. The README states that user-facing documentation is hosted on the Ray documentation site, not in the repository. That is a maintenance cost: you have to read two places to understand the project. The operator itself is the core, and it is fully maintained, but the ecosystem components are optional and less stable. Upgrading KubeRay might require migrating your custom resources if the CRD schemas change. Check the release notes for breaking changes before upgrading.
Editorial conclusion
Adopt KubeRay if you are already committed to Ray and need a Kubernetes-native way to manage Ray clusters, jobs, and Serve deployments. It is the most direct path for teams that want to move from manual Ray cluster management to operator-based lifecycle control. Do not adopt it if you only need simple batch jobs on Kubernetes; tools like Kueue or plain Kubernetes Jobs might be simpler. Before adopting, verify the stability of the components you rely on: the kubectl plugin is Beta, the APIServer is Alpha, and the dashboard is Experimental. Check the Ray documentation for the latest supported versions and migration notes, and evaluate whether the operator's autoscaling and fault tolerance features match your cluster's actual constraints.
Community notes