GuidesAPI Reference
Log In

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 is the official CLI tool for AWS EKS. It is the simplest way to create a cluster for use with Prodvana.

  1. Install eksctl in an environment where you have the aws cli tool installed and configured with an account with AdministratorAccess.
  2. 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

  1. Once eksctl completes, you're cluster has been created!
  2. To validate the cluster is ready to be used as a Prodvana Runtime:
    1. Install and authenticate [pvnctl](https://docs.prodvana.io/docs/pvnctl) in the same environment you ran eksctl
    2. Ensure you are authenticated with aws with the same user you used to create the cluster.
  3. Run pvnctl preflight k8s (more information here: pvnctl preflight)
    1. follow the prompts, and select the EKS cluster you created from the list. (it will look something like <identity>@<cluster-name>.<region>.eksctl.io)
    2. This will run a series of checks to ensure you can successfully deploy the Prodvana Agent to your new cluster.

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

  1. Go to the VPC Console page
  2. click the “Create VPC” button
  1. Ensure the VPC and more option is selected
  2. In the Name tag auto-generation section, change the default name to prodvana-runtime or similar. This will help generate human readable names.
  3. Set the NAT Gateways option to 1 Per AZ
  4. All other options should be kept at the default. As of writing the defaults for each field are:
    1. IPv4 CIDR block = 10.0.0.0/16 (if this changes, use the new AWS default)
    2. IPv6 CIDR block = No IPv6 CIDR block
    3. Tenancy = Default
    4. Number of Availability Zones = 2
    5. Number of public subnets = 2
    6. Number of private subnets = 2
    7. VPC endpoints = S3 Gateway
    8. DNS Options:
      1. Enable DNS hostnames
      2. Enable DNS resolution
  1. Click Create VPC

Create IAM roles needed by the EKS Cluster

  1. 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
  2. TODO

Create the EKS Cluster

  1. Go to the EKS Console page
  2. Click the Create cluster button and select Create from the dropdown.
  1. Under Cluster configuration
    1. Give the cluster a name, like “prodvana-mgmt-runtime” or similar.
    2. Keep the default selected Kubernetes version.
    3. For Cluster service role select the role you created in Create IAM roles needed by the EKS Cluster
  1. Under Cluster access keep the defaults:
    1. Bootstrap cluster administrator access = Allow cluster administrator access
    2. Cluster authentication mode = EKS API and ConfigMap
  1. Under Secrets encryption keep the defaults:
    1. Turn on envelope encryption of Kubernetes secrets using KMS = off
  2. Click Next
  1. Under Networking:
    1. for VPC select the VPC you created in Create a VPC for the EKS Cluster
    2. The VPC’s subnets should be automatically selected, ensure you see 4 subnets.
    3. Keep Security groups empty
    4. Keep Choose cluster IP address family set to IPv4
    5. Keep Configure Kubernetes service IP address range set to off
  1. Under Cluster endpoint access
    1. Keep the default Public and private option selected
  2. Click Next
  1. Under Configure observability you can leave the default options (all optional observability disabled).
  2. Click Next
  3. Under Select add-ons ensure the following default add-ons are enabled:
    1. Amazon VPC CNI
    2. CoreDNS
    3. kube-proxy
    4. Amazon EKS Pod Identity Agent
  4. Click Next
  1. Under Configure selected add-ons settings leave all the default versions set for the add-ons.
  2. Click Next
  3. 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.
  4. 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.

  1. From the EKS Cluster’s console page, go to the Compute tab, and click the Add node group button
  1. Under Node group configuration
    1. Set the Name to “primary”
    2. For Node IAM role select the IAM role you created in Create IAM roles needed by the EKS Cluster
  1. Keep the defaults for all remaining sections on this page and click Next
  1. Under Node group compute configuration:
    1. Keep AMI type on the default Amazon Linux 2
    2. Keep Capacity type set to On-Demand
    3. For Instance types search for m5a.large and select it.
    4. Keep Disk size set to the default of 20 GiB
  1. Under Node group scaling configuration keep Desired size, Minimum size, and Maximum size set to the default 2
  2. Under Node group update configuration keep the default Number option selected and set the Value to 1
  3. Click Next
  1. 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
  2. Click Next
  3. You will now be on the Review and create page. Double check the values match what we just configured and click Create.
  4. 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.

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.

  1. Open a terminal emulator on a computer where you have the aws and kubectl command line tools installed.
  2. Make sure you have run aws configure and authenticated with the same user you used in the Web Console to create the cluster.
  3. 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>
  1. Run pvnctl preflight k8s (more information here: pvnctl preflight)
    1. follow the prompts, and make sure to select the EKS cluster we just created from the list.
    2. This will run a series of checks to make sure you will be able to successfully deploy the Prodvana Agent to your new cluster.