KubeRay Operator Add-on¶
Ray is a framework for scaling AI applications written in Python. Ray consists of a core distributed runtime and a set of AI libraries for simplifying ML compute. Ray allows scaling applications from a laptop to a cluster.
KubeRay is a Kubernetes Operator that simplifies the deployment and management of Ray applications on Kubernetes. It is made of the following components:
- KubeRay core, the official, fully-maintained component of KubeRay that provides three custom resource definitions, RayCluster, RayJob, and RayService
- Community-managed components (optional): KubeRay APIServer, KubeRay Python client and KubeRay CLI
Please refer to KubeRay Operator documentation for detailed information.
This add-on installs the KubeRay Operator Helm chart.
Usage¶
import { Construct } from 'constructs';
import * as blueprints from '@aws-quickstart/eks-blueprints';
export class KubeRayConstruct extends Construct {
constructor(scope: Construct, id: string) {
super(scope, id);
const stackID = `${id}-blueprint`;
const addOn = new blueprints.addons.KubeRayAddOn();
blueprints.EksBlueprint.builder()
.account(process.env.CDK_DEFAULT_ACCOUNT!)
.region(process.env.CDK_DEFAULT_REGION!)
.version('auto')
.addOns(addOn)
.build(scope, stackID);
}
}
Validation¶
To validate the KubeRay Operator installation, please run the following command:
kubectl get pods
Expected output:
NAME READY STATUS RESTARTS AGE
kuberay-operator-58c98b495b-5k75l 1/1 Running 0 112m