Deploy Anyscale on Kubernetes
Deploy Anyscale on Kubernetes
This page provides an overview of the permissions and resources required to deploy the Anyscale operator on Kubernetes.
You can deploy Anyscale to an existing Kubernetes cluster or deploy Anyscale alongside a new Kubernetes cluster. Supported Kubernetes clusters include Amazon Elastic Kubernetes Service (EKS), Google Kubernetes Engine (GKE), Azure Kubernetes Service (AKS), CoreWeave Kubernetes Service (CKS), Oracle Kubernetes Engine (OKE), or other Kubernetes clusters running in the cloud or on-prem.
Anyscale has introduced a new simplified flow for configuring an Anyscale cloud backed by Kubernetes and deploying the Anyscale operator. This flow supports GKE and EKS. See Baseline deploy for EKS and GKE.
Deploying Anyscale on other Kubernetes services requires customization for your environment. Anyscale works with customers to customize Terraform modules that deploy the operator and configure resources in your Kubernetes environment.
Contact Anyscale support for assistance customizing Terraform modules and deploying Anyscale on Kubernetes.
You can review the Anyscale Terraform modules for Kubernetes, but Anyscale doesn't recommend attempting to deploy the Anyscale operator on Kubernetes independently.
What is the Anyscale operator for Kubernetes?
The Anyscale operator for Kubernetes manages the relationship between the Anyscale control plane and your Kubernetes cluster. When you deploy Anyscale on Kubernetes, you configure a control plane role, networking, and security to allow the Anyscale control plane to use the Anyscale operator to manage resources in your Kubernetes cluster.
When you deploy the Anyscale operator on Kubernetes, Anyscale installs the operator to your Kubernetes cluster. You interact with the Anyscale control plane to configure workspaces, jobs, and services. The control plane sends instructions to the Anyscale operator to deploy Ray nodes using pods in your Kubernetes cluster.
The following diagram provides a high-level overview of the architecture of Anyscale on Kubernetes:

Namespace resources used by the Anyscale operator
The Anyscale operator uses the following namespace resources in your Kubernetes cluster:
- Pods: Each Anyscale node maps to a single pod.
- Services and Ingresses: Used for head node connectivity and for exposing Anyscale services. Ingresses might be either private or public.
- Secrets: Used to hold secrets used by the Anyscale operator.
- ConfigMaps: Used to store configuration options for the Anyscale operator.
- Events: Used to enhance workload observability.
Global resources used by the Anyscale operator
The Anyscale operator uses the following global resources in your Kubernetes cluster:
- TokenReview: On the startup of an Anyscale node in an Anyscale workload, Anyscale uses the Kubernetes TokenReview API to verify a pod's identity when the pod bootstraps itself to the Anyscale control plane.
- Nodes: The operator periodically reads node information to enhance workload observability.
Installing the Helm chart for the Anyscale operator requires permissions to create cluster roles and cluster role bindings, which grant the Anyscale operator the necessary permissions to manage these global resources. If you don't have these permissions, consider deploying Anyscale inside of vCluster in a Namespace of your choice.
Features missing from Anyscale on Kubernetes
Most Anyscale features have full support for Kubernetes deployments, with the following exceptions:
- Some optimization features for accelerated cluster startup aren't available.
- For zero downtime upgrades to Anyscale services, you must use an ingress controller that Anyscale can patch.
- You can't enable head node fault tolerance at the cloud level. You must configure
ray_gcs_external_storage_configin each service config and provision your own Redis-compatible cluster. See Manually configure fault tolerance for an Anyscale service.
If you don't have access to desired Anyscale features, your admin might have deployed the Anyscale operator without the required resources, networking, or permissions. Contact Anyscale support to troubleshoot your deployment.
Baseline deploy for EKS and GKE
You can use the anyscale cloud setup CLI command to configure an Anyscale cloud against an existing EKS or GKE cluster. This flow results in a working baseline configuration of Anyscale on EKS or GKE, but further configuration is necessary to unlock some features. For example, Anyscale doesn't configure shared storage during this flow.
After initial setup, you can customize your deployment by updating the Helm chart and upgrading the Anyscale operator. Some customizations might also require updates to resources in the cloud provider account, IAM permissions, or configurations for your Anyscale cloud. See Configure the Helm chart for the Anyscale operator.
The anyscale cloud setup CLI flow for Kubernetes is in beta. Anyscale recommends this flow for self-service onboarding for customers new to configuring EKS or GKE for Anyscale.
Clouds deployed and configured using this flow are production-ready and eligible for support. All features available for Anyscale on GKE or EKS are available regardless of whether you start your deployment with anyscale cloud setup or anyscale cloud register.
If you're installing the Anyscale operator to a Kubernetes environment that is highly customized, you might need to use the anyscale cloud register command and configure your Helm chart manually to install the Anyscale operator. See Deploy Anyscale to your Kubernetes cluster.
The anyscale cloud setup flow focuses on getting you to a functional baseline state quickly, then letting you customize your deployment to meet additional needs. You should plan to customize your Kubernetes environment and Anyscale cloud configurations before moving to production. You can use this flow to test your configuration in an isolated environment, then using your customized Helm chart values to install the Anyscale operator in your production Kubernetes environment.
Contact Anyscale support for assistance with configuration and customization.
Requirements
This flow installs ingress-nginx to configure ingress for the Anyscale operator in your Kubernetes cluster. Ingress is required to support features such as dashboards and Anyscale services.
If you need to use a gateway to control ingress, don't use anyscale cloud setup.
- EKS
- GKE
You must complete the following before using anyscale cloud setup to configure an Anyscale cloud on EKS:
- You must be an Anyscale organization owner.
- You must have an existing EKS cluster deployed in your AWS account.
- You must have sufficient privileges in AWS to use CloudFormation to create an S3 bucket, create IAM roles, and configure your EKS cluster.
- You must have the following CLI tools installed on your local machine:
- The Anyscale CLI
aws. See Installing or updating to the latest version of the AWS CLI.helmkubectl
- Run
anyscale loginto configure an API key for interacting with Anyscale. See Authenticate the Anyscale CLI. - Configure AWS credentials for the AWS CLI. See Configuration and credential file settings in the AWS CLI.
You must complete the following before using anyscale cloud setup to configure an Anyscale cloud on GKE:
- You must be an Anyscale organization owner.
- You must have an existing GKE cluster deployed in your Google Cloud account.
- You must have sufficient privileges in Google to create a GCS bucket, create a service account, and configure your GKE cluster.
- You must have the following CLI tools installed on your local machine:
- The Anyscale CLI
gcloudandgsutil. See Install the gcloud CLI.helmkubectl
- Run
anyscale loginto configure an API key for interacting with Anyscale. See Authenticate the Anyscale CLI. - Configure Google Cloud credentials for the Google Cloud CLI. See Authorize the gcloud CLI.
Step 1: Run the cloud setup command
- EKS
- GKE
Run the following command to begin the cloud registration flow:
anyscale cloud setup --name <cloud-name> --provider aws --stack k8s --region <region> --cluster-name <eks-name> --functional-verify
Substitute the following variables:
cloud-name: A unique name for your new Anyscale cloud.region: The AWS region containing your EKS cluster.eks-name: The name of an existing EKS cluster in the specified region for your AWS account.
Run the following command to begin the cloud registration flow:
anyscale cloud setup --name <cloud-name> --provider gcp --stack k8s --project-id <project-id> --region <region> --cluster-name <gke-name> --functional-verify
Substitute the following variables:
cloud-name: A unique name for your new Anyscale cloud.project-id: The name of the Google Cloud project containing your GKE cluster.region: The Google Cloud region containing your GKE cluster.gke-name: The name of an existing GKE cluster in the specified region for your Google Cloud account.
Step 2: Specify a namespace
The CLI prompts you to provide a namespace. Leave blank to accept the default value, or specify a new or existing namespace.
Anyscale recommends using a dedicated namespace for each Anyscale cloud registered to a Kubernetes cluster. See Namespace resources used by the Anyscale operator.
Step 3: Monitor progress
The CLI reports progress as it discovers information about your Kubernetes cluster and configures resources in your cloud provider account and Anyscale. The CLI completes the following steps:
- EKS
- GKE
- Does Kubernetes environment discovery.
- Configures and verifies
kubeconfig. - Creates a CloudFormation stack. This stack completes the following:
- Creates an S3 bucket.
- Configures an IAM role for the Anyscale operator. See Configure IAM roles for clusters on Anyscale on EKS.
- Registers an Anyscale cloud using the IAM role and S3 bucket.
- Generates a Helm chart values file with all values captured about your EKS and AWS environments.
- Installs the Anyscale operator in the specified namespace on your EKS cluster.
- This step configures and installs an
ingress-nginxpod. See the GitHub for Ingress NGINX Controller.
- This step configures and installs an
- Verifies that all configured and deployed resources communicate as expected.
- Kubernetes environment discovery.
kubeconfigconfiguration and verification.- Runs Google CLI commands to complete the following:
- Create an Google Cloud Storage (GCS) bucket.
- Configure a Google Cloud service account for the Anyscale operator. See Configure service accounts for clusters on Anyscale on GKE.
- Registers an Anyscale cloud using the service account and GCS bucket.
- Generates a Helm chart values file with all values captured about your GKE and Google Cloud environments.
- Installs the Anyscale operator in the specified namespace on your GKE cluster.
- This step configures and installs an
ingress-nginxpod. See the GitHub for Ingress NGINX Controller.
- This step configures and installs an
- Verifies that all configured and deployed resources communicate as expected.
If you encounter errors during this flow, the CLI doesn't attempt to remove any resources or configurations from successfully completed steps.
For assistance troubleshooting setup errors, contact Anyscale support and provide the CLI output.
You must have sufficient privileges in the target AWS or Google Cloud account to troubleshoot the installation. If you lack privileges, contact your cloud provider admin to request privileges or include your cloud provider admin in your Anyscale support request.