Skip to content

Part 4: Connect the cluster to EKS with EKS Connector

This section covers the basic steps to connect your cluster to EKS with the EKS Connector. There are many more details (include pre-requisites like IAM permissions) in the EKS Connector Documentation.

Steps

1. Setup AWS credentials

Follow the AWS documentation and set the environment variables with your authentication info for AWS in your eks-admin device. For example:

Bash
export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
export AWS_DEFAULT_REGION=us-west-2

2. Register the cluster

Use eksctl to register the cluster

Bash
CLUTER_NAME="My-Metal-Cluster"
AWS_REGION="eu-west-1"
eksctl register cluster --name $CLUTER_NAME --provider other --region region-code

If it succeeded, the output will show several .yaml files that were created and need to be registered with the cluster. For example, at the time of writing, applying those files would be done like so:

Bash
kubectl apply -f eks-connector.yaml,eks-connector-clusterrole.yaml,eks-connector-console-dashboard-full-access-group.yaml

Even more info can be found at the eksctl documentation.

Discussion

Before proceeding to the next part let's take a few minutes to discuss what we did. Here are some questions to start the discussion.

  • Is there any official alternative?