AWS: Configuring an EKS Cluster
Requirements
- An AWS Account
- Follow this guide with an AWS IAM User that has
AdministatorAccess
This guide provides two options for creating your cluster, using eksctl (recommended) or using the AWS Console.
Option 1: Create a cluster via eksctl
eksctl
eksctl is the official CLI tool for AWS EKS. It is the simplest way to create a cluster for use with Prodvana.
- Install
eksctl
in an environment where you have theaws
cli tool installed and configured with an account withAdministratorAccess
. - Run the following command to create a simple EKS cluster using the AWS recommended template:
eksctl create cluster --name my-cluster --region <region-code> --instance-types m5a.large
We do not recommend using the
--fargate
option
- Once
eksctl
completes, you're cluster has been created! - To validate the cluster is ready to be used as a Prodvana Runtime:
- Install and authenticate
[pvnctl](https://docs.prodvana.io/docs/pvnctl)
in the same environment you raneksctl
- Ensure you are authenticated with
aws
with the same user you used to create the cluster.
- Install and authenticate
- Run
pvnctl preflight k8s
(more information here: pvnctl preflight)- follow the prompts, and select the EKS cluster you created from the list. (it will look something like
<identity>@<cluster-name>.<region>.eksctl.io
) - This will run a series of checks to ensure you can successfully deploy the Prodvana Agent to your new cluster.
- follow the prompts, and select the EKS cluster you created from the list. (it will look something like
Option 2: Create a cluster via the AWS Console
In the AWS Console, make sure to select the region you want to deploy the cluster into.
Create a VPC for the EKS Cluster
- Go to the VPC Console page
- click the “Create VPC” button
![](https://files.readme.io/b469b5d-Screenshot_2024-01-08_at_5.20.15_PM.png)
- Ensure the VPC and more option is selected
- In the Name tag auto-generation section, change the default name to
prodvana-runtime
or similar. This will help generate human readable names. - Set the NAT Gateways option to 1 Per AZ
- All other options should be kept at the default. As of writing the defaults for each field are:
- IPv4 CIDR block = 10.0.0.0/16 (if this changes, use the new AWS default)
- IPv6 CIDR block = No IPv6 CIDR block
- Tenancy = Default
- Number of Availability Zones = 2
- Number of public subnets = 2
- Number of private subnets = 2
- VPC endpoints = S3 Gateway
- DNS Options:
- ✅ Enable DNS hostnames
- ✅ Enable DNS resolution
![](https://files.readme.io/bc3062f-Screenshot_2024-01-08_at_5.21.13_PM.png)
![](https://files.readme.io/4116a53-Screenshot_2024-01-08_at_5.22.10_PM.png)
- Click Create VPC
Create IAM roles needed by the EKS Cluster
- Follow this guide to create an IAM role for the EKS cluster nodes: https://docs.aws.amazon.com/eks/latest/userguide/service_IAM_role.html#create-service-role
- TODO
Create the EKS Cluster
- Go to the EKS Console page
- Click the Create cluster button and select Create from the dropdown.
![](https://files.readme.io/9476245-Screenshot_2024-01-08_at_5.32.57_PM.png)
- Under Cluster configuration
- Give the cluster a name, like “prodvana-mgmt-runtime” or similar.
- Keep the default selected Kubernetes version.
- For Cluster service role select the role you created in Create IAM roles needed by the EKS Cluster
![](https://files.readme.io/e17f5a8-Screenshot_2024-01-08_at_5.33.41_PM.png)
- Under Cluster access keep the defaults:
- Bootstrap cluster administrator access = Allow cluster administrator access
- Cluster authentication mode = EKS API and ConfigMap
![](https://files.readme.io/3a15c5c-Screenshot_2024-01-08_at_5.49.08_PM.png)
- Under Secrets encryption keep the defaults:
- Turn on envelope encryption of Kubernetes secrets using KMS = off
- Click Next
![](https://files.readme.io/667aa06-Screenshot_2024-01-08_at_5.49.16_PM.png)
- Under Networking:
- for VPC select the VPC you created in Create a VPC for the EKS Cluster
- The VPC’s subnets should be automatically selected, ensure you see 4 subnets.
- Keep Security groups empty
- Keep Choose cluster IP address family set to IPv4
- Keep Configure Kubernetes service IP address range set to off
![](https://files.readme.io/86aedee-Screenshot_2024-01-08_at_5.50.16_PM.png)
- Under Cluster endpoint access
- Keep the default Public and private option selected
- Click Next
![](https://files.readme.io/107e426-Screenshot_2024-01-08_at_5.51.24_PM.png)
- Under Configure observability you can leave the default options (all optional observability disabled).
- Click Next
- Under Select add-ons ensure the following default add-ons are enabled:
- Amazon VPC CNI
- CoreDNS
- kube-proxy
- Amazon EKS Pod Identity Agent
- Click Next
![](https://files.readme.io/2813bb4-Screenshot_2024-01-08_at_5.54.06_PM.png)
- Under Configure selected add-ons settings leave all the default versions set for the add-ons.
- Click Next
- You should now be on the Review and create step. Double check the options on this page match the options we set above, then click Create.
- You will now be redirected to the AWS Console page for your new EKS cluster.
Create a Node Group for the EKS Cluster
It can take 5-10 minutes for AWS to finish creating the cluster. Make sure to wait until the Cluster Status changes to “Active” before continuing.
![](https://files.readme.io/d55a869-Screenshot_2024-01-08_at_6.06.27_PM.png)
- From the EKS Cluster’s console page, go to the Compute tab, and click the Add node group button
![](https://files.readme.io/266dd54-Screenshot_2024-01-08_at_6.07.59_PM.png)
- Under Node group configuration
- Set the Name to “primary”
- For Node IAM role select the IAM role you created in Create IAM roles needed by the EKS Cluster
![](https://files.readme.io/58a5fbf-Screenshot_2024-01-08_at_6.12.33_PM.png)
- Keep the defaults for all remaining sections on this page and click Next
![](https://files.readme.io/af8fe60-Screenshot_2024-01-08_at_6.12.52_PM.png)
- Under Node group compute configuration:
- Keep AMI type on the default Amazon Linux 2
- Keep Capacity type set to On-Demand
- For Instance types search for
m5a.large
and select it. - Keep Disk size set to the default of 20 GiB
![](https://files.readme.io/8a5e411-Screenshot_2024-01-10_at_2.09.27_PM.png)
- Under Node group scaling configuration keep Desired size, Minimum size, and Maximum size set to the default 2
- Under Node group update configuration keep the default Number option selected and set the Value to 1
- Click Next
![](https://files.readme.io/1243635-Screenshot_2024-01-10_at_2.09.44_PM.png)
- Under Node group update configuration you should see a list of all 4 subnets of the VPC you created in Create a VPC for the EKS Cluster
- Click Next
- You will now be on the Review and create page. Double check the values match what we just configured and click Create.
- You will be redirected to the Node Group’s console page. Wait until the Node Group’s Status changes from Creating to Active before moving on.
![](https://files.readme.io/ec0c2ea-Screenshot_2024-01-08_at_6.27.46_PM.png)
Validate the cluster
You should now have an EKS cluster that is configured and ready to be used by Prodvana. We will now run a validation tool to ensure the cluster is configured correctly.
- Open a terminal emulator on a computer where you have the
aws
andkubectl
command line tools installed. - Make sure you have run
aws configure
and authenticated with the same user you used in the Web Console to create the cluster. - Run the following command with the region and cluster name you used when creating the cluster.
aws eks update-kubeconfig --region <region-code> --name <cluster-name>
- Run
pvnctl preflight k8s
(more information here: pvnctl preflight)- follow the prompts, and make sure to select the EKS cluster we just created from the list.
- This will run a series of checks to make sure you will be able to successfully deploy the Prodvana Agent to your new cluster.
Updated 7 months ago