Set up Anyscale on EKS
Set up Anyscale on EKS
This page describes how to set up an Anyscale cloud on Amazon Elastic Kubernetes Service (EKS) using the anyscale cloud setup command. This flow creates a working baseline so you can run jobs and services. You can customize networking, node pools, and security after setup.
The anyscale cloud setup CLI flow for Kubernetes is in beta. Anyscale recommends this flow for self-service onboarding. Clouds deployed with this flow are production-ready and eligible for support. All features available for Anyscale on EKS are available whether you use anyscale cloud setup or anyscale cloud register.
By default, this flow prompts you to install ingress-nginx. You can skip this and configure your own ingress or gateway controller. To fully customize the ingress setup, use anyscale cloud register and configure your Helm chart manually. See Anyscale on Kubernetes.
Contact Anyscale support for configuration and customization help.
Prerequisites
Before you start, ensure the following:
- You are an Anyscale organization owner.
- You have an existing EKS cluster with an OIDC provider enabled. The cloud setup command uses this to create an IAM role for the Anyscale operator using IAM Roles for Service Accounts (IRSA). To create a cluster, see Create an Amazon EKS cluster in the AWS docs or use the Anyscale Terraform module for EKS. To enable an OIDC provider on an existing cluster, see Create an IAM OIDC provider for your cluster in the AWS docs.
- You have sufficient AWS permissions to create CloudFormation stacks, S3 buckets, and IAM roles in the cluster's region.
- The Anyscale CLI is installed:
pip install -U anyscale. Runanyscale loginto authenticate. - The following CLI tools are installed:
aws,kubectl,helm. Runaws configureto set up your credentials if needed.
Cluster and cloud details
Enter the following values. You'll use them when connecting with kubectl and running cloud setup.
Connect to your EKS cluster
Configure kubectl to use your cluster:
aws eks update-kubeconfig --region <region> --name <cluster-name>
Verify the connection:
kubectl get nodes
Run cloud setup
Run the cloud setup command:
anyscale cloud setup \
--stack k8s \
--cluster-name <cluster-name> \
--functional-verify
The CLI prompts you for additional values to complete your cloud setup.
- The
--functional-verifyruns a post-setup check to confirm the cloud can run a workload.
When prompted for a namespace, press Enter to use the default anyscale-operator or type a different namespace. Anyscale recommends a dedicated namespace per Anyscale cloud. See Anyscale on Kubernetes.
What the CLI does
The CLI runs the following steps:
- Discovery: Validates the EKS cluster, retrieves the OIDC provider details, and configures your kubeconfig.
- CloudFormation deployment: Creates a CloudFormation stack that provisions an S3 bucket for workload storage and an IAM role scoped to the cluster's OIDC provider for the Anyscale operator.
- Cloud registration: Registers the Anyscale cloud with the control plane using the new bucket and IAM role.
- Operator install: Generates a Helm values file and installs the Anyscale operator in your chosen namespace. The CLI prompts you to install
ingress-nginxas the ingress controller for dashboards and Anyscale services. You can skip this step and configure your own ingress controller. - Verification: If you used
--functional-verify, runs a check to confirm the cloud is usable.
If setup fails, the CLI doesn't automatically remove resources created in earlier steps. For troubleshooting and cleanup steps, contact Anyscale support and provide the CLI output. You need sufficient AWS permissions to clean up or retry.
Verify your cloud
If you didn't use --functional-verify, verify the cloud manually:
anyscale cloud verify --name <cloud-name>
You can also submit a small job to confirm the cloud works:
anyscale job submit --cloud <cloud-name> --working-dir https://github.com/anyscale/docs_examples/archive/refs/heads/main.zip -- python hello_world.py
Next steps
- Customize the operator: See Configure the Helm chart for the Anyscale operator.
- Manage IAM permissions: See Configure IAM roles for clusters on Anyscale on EKS.
- Access S3 buckets from workloads: See Access S3 buckets.
- Access Amazon ECR: See Access Amazon ECR.