fbpx

This getting started guide helps you to create all of the required resources to get started with Amazon EKS and connect it with a Spotinst Elastigroup to manage the underlying EC2 Instances.


 

Before you begin, you can install an EKS cluster manually from the AWS Console using “Step 1 – Create The EKS Cluster (Manually) ” Or, in case you want to automate the process, you can use predefined CloudFormation templates, based on your use case.

  1. Create a new EKS Cluster + Elastigroup   (open link a new tab)
  2. If you already have an EKS cluster – Attach an Elastigroup to an existing EKS Cluster   (open link a new tab)

Once your CloudFormation Stack is created – please jump into “Step 3 – Configure The Worker Nodes To Join The EKS Cluster”


 

Step 1 – Create the EKS Cluster (Manually)

  1. Create VPC for EKS, OR Alter existing VPC and security groups according to the following guides:
    https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html
    https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html
  2. Create EKS IAM Service Role:

  1. Create EKS cluster, utilizing the Role you created in the previous step
  2. Wait for the cluster initialization

  1. Configure kubectl according to:
    https://docs.aws.amazon.com/eks/latest/userguide/configure-kubectl.html
    And
    https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html#eks-configure-kubectl

 


Step 2 – Connect Elastigroup as your worker Nodes

Attach an Elastigroup to your newly created EKS Cluster using the following CloudFormation Stack  

 


 

Step 3 – Configure the worker nodes to join the EKS Cluster

  1. Install the Spotinst Kubernetes Controller
  2. After the cluster creation is completed – set up a configurator map so that the worker nodes know how to join the cluster. Download the map, add the ARN of the NodeInstanceRole from the stack, and apply the configuration:

Download, edit, and apply the AWS authenticator configuration map:

curl -O https://amazon-eks.s3-us-west-2.amazonaws.com/1.10.3/2018-06-05/aws-auth-cm.yaml

Open the file with your favorite text editor. Replace the <ARN of instance role (not instance profile)> snippet with the NodeInstanceRole value that you recorded in the previous procedure, and save the file.

apply the yaml file to your cluster

kubectl apply -f aws-auth-cm.yaml

 

 Important! Do not modify any other lines in this file.

If you receive the error "heptio-authenticator-aws": executable file not found in $PATH, then your kubectl is not configured for Amazon EKS. For more information, see Configure kubectl for Amazon EKS.

 

Enjoy the powerful Spotinst k8s dashboards!

You’re all set! Nodes can be seen inside your cluster with kubectl get nodes