fbpx

Running Elastigroup For EKS

This guide covers the requirements to launch Amazon EKS and create an Elastigroup to manage the underlying EC2 Instances.

Prerequisites
  1. kubectl (Amazon EKS-vended)
  2. awscli 1.16.18+
  3. aws-iam-authenticator
Step 1: Create an Amazon EKS cluster and an Elastigroup

To create an EKS cluster and an Elastigroup launch the CloudFormation template with the link below, complete the parameters in the template and click Create.

For existing EKS clusters: Select the ‘Join Existing EKS Cluster’ rubric from the elastigroup use case creation page, Fill in the required details:

  • Elastigroup name
  • Select the AWS Region your EKS cluster resides in
  • Select the Autoscaling Group associated with your existing EKS cluster

Or

Launch the following CFN template, and follow it’s required steps.

Step 2: Configure Worker Nodes Managed by Elastigroup To Join The EKS Cluster
  • Download the EKS cluster configuration using the following command:
    aws eks update-kubeconfig --name $CLUSTER_NAME
  • Connect kubectl to your EKS cluster
    kubectl get svc
  • Install the Spotinst Kubernetes Controller
Step 3: Update AWS Authentication Config-Map
  • Download 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
  • In the aws-auth-cm.yaml file, replace the <ARN of instance role (not instance profile)> snippet with the NodeInstanceRole value from the EKS cluster CloudFormation Stack.
  • Apply the updated aws-auth-cm.yaml to the cluster.
    kubectl apply -f aws-auth-cm.yaml
Caution: Do not modify any other lines in this file.

That’s it! Elastigroup will now manage the worker nodes, optimizing cluster resource utilization and maximizing savings with Spot instances.

Troubleshooting
  • If you receive the error "aws-iam-authenticator": executable file not found in $PATH, then your kubectl is not configured for Amazon EKS. For more information, see Configure kubectl for Amazon EKS.
  • You can list your cluster nodes with the following command:
    kubectl get nodes