fbpx

Running Ocean For a new EKS Cluster

This guide covers the requirements to launch Amazon EKS and create an Ocean to manage the cluster worker nodes.

Prerequisites
  1. kubectl (Amazon EKS-vended)
  2. awscli 1.16.18+
  3. aws-iam-authenticator
Step 1: Create the Ocean and EKS Clusters
CloudFormation

To create new Ocean and EKS clusters, launch the CloudFormation template with the link below, complete the parameters in the template and click Create.

 

Terraform

To create new Ocean and EKS clusters, download and run the following Terraform plan:

Download: ocean_eks.tf

 

Step 2: Configure Worker Nodes Managed by Ocean 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! Ocean 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