Menu
InfoQ Architecture·November 30, 2026

KubeRay: Orchestrating Distributed AI/ML Workloads on Kubernetes

The Cloud Native Computing Foundation (CNCF) has accepted KubeRay as a sandbox project. KubeRay is a Kubernetes operator that streamlines the management and orchestration of distributed Ray clusters and jobs, enabling teams to run AI/ML workloads on Kubernetes with features like autoscaling, fault tolerance, and job lifecycle management. This integration simplifies infrastructure for AI/ML development and deployment.

Read original on InfoQ Architecture

Introduction to KubeRay and its Purpose

KubeRay is a Kubernetes operator designed to manage the lifecycle of Ray clusters and workloads within a Kubernetes environment. Ray is an open-source framework that provides a simple, universal API for building and running distributed applications, particularly suited for AI/ML workloads such as distributed training, data processing, and serving. The acceptance of KubeRay into the CNCF sandbox signifies its growing importance in the cloud-native AI/ML ecosystem, offering a standardized approach to deploying and managing these complex distributed systems.

Architectural Overview of KubeRay

KubeRay operates by extending Kubernetes with custom resources, allowing platform teams to define and manage Ray clusters and jobs using native Kubernetes declarations. It runs Ray nodes as Kubernetes pods, with a designated head pod coordinating a set of worker pods. The operator handles the complexities of cluster provisioning, autoscaling, and fault tolerance, abstracting away much of the underlying infrastructure management.

  • RayCluster: Manages the lifecycle of a Ray cluster, including provisioning and integration with the Ray Autoscaler for dynamic scaling.
  • RayJob: Orchestrates batch workloads by creating a Ray cluster, submitting a job, and optionally deleting the cluster upon completion. It also supports reusing existing long-running clusters.
  • RayService: Designed for online inference, it manages a Ray cluster alongside its Ray Serve deployments, supporting features like zero-downtime cluster upgrades and high-availability configurations.
💡

GCS Fault Tolerance

For highly available RayService deployments, it's crucial to explicitly configure Global Control Service (GCS) fault tolerance. This often involves an external Redis deployment for metadata persistence, ensuring that cluster-level metadata is resilient to failures.

Integration with Kubernetes Ecosystem

KubeRay integrates with various Kubernetes tools to enhance its functionality and fit seamlessly into existing cloud-native infrastructures. This includes:

  • Scheduling: Compatibility with Kueue for job queuing and quota management, and Volcano for fair-share and gang scheduling, which is critical for resource-intensive distributed training jobs requiring scarce accelerators.
  • Monitoring: Ray exposes metrics in Prometheus format, facilitating integration with standard observability stacks. Fluent Bit can be used for centralized log collection from workers and jobs.
  • Security: Support for mutual TLS (mTLS) for secure inter-cluster communication and Kubernetes network policies for isolation, although these are typically opt-in and require explicit configuration.
KubernetesRayCNCFOperatorAI/MLDistributed WorkloadsOrchestrationCloud Native

Comments

Loading comments...