Skip to main content

Creating an EKS Cluster in AWS

Hands-On Lab


Photo of Mark Richman

Mark Richman

AWS Training Architect II in Content





What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.

Creating an EKS Cluster in AWS


In this hands-on AWS lab, we will create our own Elastic Container Service for Kubernetes (EKS) cluster. We will use the eksctl command line utility to create the VPC infrastructure, EKS cluster, and EKS worker nodes. We will then connect to the EKS cluster using the kubectl utility.

Connecting to the Lab

  1. Open your terminal application, and run the following command. (Remember to replace <PUBLIC_IP> with the public IP you were provided on the lab instructions page.)
    ssh cloud_user@<PUBLIC_IP>
  2. Type yes at the prompt.
  3. Enter your password at the prompt.

Configure Your AWS CLI Credentials

  1. Run the aws configure command.
    aws configure
  2. Enter your access key at the prompt.
  3. Enter your secret access key at the prompt.
  4. Specify the default region name.
  5. Verify that the configuration was successful.
    aws sts get-caller-identity

Create a New EKS Cluster

  1. Create the cluster.
    eksctl create cluster --region=us-east-1 --node-type=t2.medium
  2. Wait for the command to finish running (it may take up to 15 minutes).

Connect to the New EKS Cluster

  1. Verify that the cluster configuration works.
    kubectl get nodes


Congratulations, you've successfully completed this hands-on lab!