Uncategorized

Deploy EKS cluster for Azure Arc Series

This post is part of the Azure Arc for Kubernetes series, in this post, we will walkthrough the deployment of the AWS EKS Cluster.

Prerequisites:

AWS Account

aws cli version

AWS-IAM-Authenticator

Terraform
  • Install wget package (required for the eks module)
  • Create AWS User IAM Key
  • Set your credentials via the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, environment variables, representing your AWS Access Key and AWS Secret Key
export AWS_ACCESS_KEY_ID="access key"
export AWS_SECRET_ACCESS_KEY="secret key"
export AWS_DEFAULT_REGION="us-west-2"
  • Clone the Azure Arc Jumpstart repository
git clone https://github.com/zaidmohd/azure_arc.git

Deployment:

  • Browse to the EKS terraform binaries
cd azure_arc/azure_arc_k8s_jumpstart/eks/terraform/
  • Update Terraform variables if required
  • Initialize Terraform
  • Deploy EKS with Terraform auto approval
  • Create Kube configuration directory, and output configuration from Terraform into config file
mkdir ~/.kube/
terraform output kubeconfig>~/.kube/config
  • Check K8s version
  • Configure EKS Nodes to communicate to Control Plane

Add the ConfigMap to the cluster from Terraform. The ConfigMap is a Kubernetes configuration, in this case for granting access to our EKS cluster. This ConfigMap allows our EC2 instances in the cluster to communicate with the EKS master, as well as allowing our user account access to run commands against the cluster.

terraform output config_map_aws_auth > configmap.yml
kubectl apply -f configmap.yml
  • Verify EKS Deployment and nodes
kubectl get nodes -o wide

Reference: EKS cluster Terraform plan | Azure Arc Jumpstart
Quickstart: Connect an existing Kubernetes cluster to Azure Arc – Azure Arc | Microsoft Docs

1 thought on “Deploy EKS cluster for Azure Arc Series”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s