Using eksctl
First, make sure to install eksctl.
Then, you can use it to create a cluster. The command below will create a demo cluster with just a single managed node.
eksctl create cluster --name=prefect-eks --nodes=1
Eksctl allows for various configurations such as:
- spinning up a managed node group with autoscaling enabled,
- using nodes with GPU enabled, ideal for flows that train deep learning models,
- leveraging spot instances for non-time-sensitive batch processing,
- using serverless Fargate nodes,
- and even deploying an AWS EKS cluster on-premise with EKS Anywhere.
Under the hood, eksctl deploys a CloudFormation stack that creates all resources required by your cluster, including a custom VPC, IAM roles, and compute instances.
Once your cluster is ready, you can run the following commands to validate that your current context points to a remote cluster on AWS:
kubectl config current-context
kubectl get nodes --show-labels
Using Terraform
https://github.com/PrefectHQ/prefect-recipes/tree/main/aws/prefect/prefect-agent-on-eks
From AWS management console
tbd