How to create a Kubernetes cluster on AWS EKS?

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:

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

1 Like