Up and Running EKS Anywhere with Multipass

Credits: Sameera Liyanage

What is EKS Anywhere?

Amazon EKS Anywhere is a new deployment option for Amazon EKS that allows customers to create and operate Kubernetes clusters on customer-managed infrastructure, supported by AWS. Customers can now run Amazon EKS Anywhere on their own on-premises infrastructure using VMware vSphere, with support for other deployment targets in the near future, including support for bare metal coming in 2022.
This helps AWS customers and even others to run Kubernetes Clusters on-premises, other clouds, and fully managed by EKS Control Plane.
For more details visit EKS Anywhere official site.

Prerequisites

You must have Multipass installed on your laptop or desktop. In case you have not installed Multipass, you can follow the Multipass installation guide/s.
It is highly recommended to have at least 32GB of RAM and 4 x CPU cores. I did manage to get up and running with 16GB and only allocating 8GB RAM for my Multipass VM.

Step 1: Create Ubuntu 20.04 LTS

#multipass launch -n my-eks-anywhere -c 4 -m 16GB -d 50G focal

Step 2: Update and Update Ubuntu OS

#multipass shell my-eks-anywhere
#sudo apt update && sudo apt upgrade -y

Step 3: Install Docker CE on Ubuntu

#sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg \
lsb-release
#curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
#echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
#sudo apt-get update
#sudo apt-get install docker-ce docker-ce-cli containerd.io

Step 4: Install eksctl and eksctl-anywhere plugin

#curl "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" \
--silent --location \
| tar xz -C /tmp
#sudo mv /tmp/eksctl /usr/local/bin/
#export EKSA_RELEASE="0.5.0" OS="$(uname -s | tr A-Z a-z)"
curl "https://anywhere-assets.eks.amazonaws.com/releases/eks-a/1/artifacts/eks-a/v${EKSA_RELEASE}/${OS}/eksctl-anywhere-v${EKSA_RELEASE}-${OS}-amd64.tar.gz" \
--silent --location \
| tar xz ./eksctl-anywhere
#sudo mv ./eksctl-anywhere /usr/local/bin/

Step 5: Create a local cluster

#CLUSTER_NAME=dev-cluster
#eksctl anywhere generate clusterconfig $CLUSTER_NAME \
--provider docker > $CLUSTER_NAME.yaml
#eksctl anywhere create cluster -f $CLUSTER_NAME.yaml

If everything is going okay at this stage you should see the following output (for me this took several hours, possibly due to the fact whole things was struggling with RAM limitations)

Performing setup and validations
✅ validation succeeded {"validation": "docker Provider setup is valid"}
Creating new bootstrap cluster
Installing cluster-api providers on bootstrap cluster
Provider specific setup
Creating new workload cluster
Installing networking on workload cluster
Installing cluster-api providers on workload cluster
Moving cluster management from bootstrap to workload cluster
Installing EKS-A custom components (CRD and controller) on workload cluster
Creating EKS-A CRDs instances on workload cluster
Installing AddonManager and GitOps Toolkit on workload cluster
GitOps field not specified, bootstrap flux skipped
Deleting bootstrap cluster
🎉 Cluster created!

Step 6: Use the cluster

If all is good, you can use the generated kubeconfig and access the cluster using kubectl (yes you do need to have kubectl installed too).

#export KUBECONFIG=${PWD}/${CLUSTER_NAME}/${CLUSTER_NAME}-eks-a-cluster.kubeconfig#kubectl get nodes -o wide

If all goes well and you DO NOT see any fire on your laptop or desktop you should be able to see the following:

Closing notes: While this proves you can install it and up and running or low resource Laptop/Dekstop, you can’t do much with it. Therefore highly recommend either trying on a Cloud Provider or a Laptop/Desktop with higher spec. For now, I will continue to use k3s on my Multipass VMs.

--

--

Kanchana Wickremasinghe
Platformer — A WSO2 Company

Husband, dad of two + 2 dogs, cook, Open Source Advocate and Co-founder of Platformer Cloud Pty Ltd (www.platformer.com — acquired by WSO2) living in Melbourne.