Getting started with Amazon EKS Anywhere
By: Date: 11/09/2021 Categories: AWS Tags:

Many customers operate their own data centers for data residency, latency, regulatory, or compliance considerations. With EKS Anywhere, you get Amazon optimized defaults for cluster configuration, machine operating systems, and 3rd-party integrations. These optimizations let you focus on your business innovations rather than complex component compatibility or disparate deployments between your on-premises and cloud environments. EKS Anywhere supports VMware vSphere today, with support for other deployment targets in the near future, including support for bare metal coming in 2022.

EKS Anywhere uses Amazon EKS Distro, which provides binary and container image compatibility between your on-premises and Amazon EKS clusters in AWS. By default, EKS Anywhere uses Bottlerocket OS to give you a secure, container-optimized operating system with full AWS support.

To show you how easy it is to get started, let’s install the EKS Anywhere CLI, create a local development cluster, and deploy an example workload with only four commands. With three additional commands, we can also test the workload and delete the cluster. To check your system requirements, please read our Getting Started documentation.

Create your first cluster

EKS Anywhere CLI is distributed as a plugin to eksctl, so we need to install eksctleksctl-anywhere, and kubectl. To make that as simple and up-to-date as possible, we’ve created a homebrew formulae for you to install on macOS or Linux operating systems. If you would like to install the components manually, you can follow the instructions in the documentation.

brew install aws/tap/eks-anywhere

Bash

Generate a manifest file for your local cluster using the Docker provider. Manifest files ensure you’re able to manage the infrastructure as code and give a declarative interface for the entire cluster lifecycle.

We’ll name our first cluster local-cluster and generate the manifest with the following command:

eksctl anywhere generate clusterconfig local-cluster \
    --provider docker > local-cluster.yaml

Bash

The default configuration is all you need to get started with the Docker provider. Use that file to create a cluster on your local machine with this command:

eksctl anywhere create cluster -f local-cluster.yaml

Bash

This output will provide progress information as the cluster is created. To understand more about the cluster creation process, review the cluster creation workflow documentation.

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!

If you see this output, you have your first EKS Anywhere cluster!

Now, let’s deploy a workload to test it. An admin kubeconfig file will be in your current directory in the local-cluster/ folder. We’ve created an example workload you can deploy to test the cluster.

kubectl apply --kubeconfig ./local-cluster/local-cluster-eks-a-cluster.kubeconfig \
    -f "https://anywhere.eks.amazonaws.com/manifests/hello-eks-a.yaml"

Bash

You will see a hello-eks-a deployment and service created in your cluster.

deployment.apps/hello-eks-a created
service/hello-eks-a created

Bash

Verify the workload by forwarding the service port to our host’s port 3000 with the following command.

kubectl port-forward svc/hello-eks-a 3000:80 \
    --kubeconfig ./local-cluster/local-cluster-eks-a-cluster.kubeconfig

Bash

Check that the service is running and available with:

curl localhost:3000

Bash

You should see output that looks like this:

Once you’re done with the cluster, you can delete it with the following command:

eksctl anywhere delete cluster local-cluster

Bash

We are excited for you to use EKS Anywhere and believe it’s an excellent way to run Kubernetes on-premises. We also have exciting future integrations and providers planned. The EKS Anywhere roadmap will be available on GitHub, and we’d love to hear about your use cases and requests.

What customers are saying

We’ve been working with customers to make sure that their needs are met with EKS Anywhere. We’ve received the following feedback during our beta program:

Nokia Cloud and Network Services (CNS) helps communication service providers (CSPs) deploy, integrate, and scale Nokia CNS cloud-native software solutions and all generations of core networks in multi-vendor environments. “Nokia CNS has been a strong partner of AWS for many years and EKS is a key container platform in our multi-vendor virtual laboratory environment,” said Jitin Bhandari, Chief Technology Officer, Cloud and Network Services at Nokia. “We successfully deployed EKS Anywhere in our on-premises data centers. As an early adopter of EKS Anywhere, we are delighted to see the flexibility EKS Anywhere gives us in the choice of EKS provisioning and the consistency it provides for Kubernetes operations across the cloud and on-premises.”

McAfee Enterprise is one of the world’s largest pure-play enterprise cybersecurity companies. “The Kubernetes approach provided by Amazon EKS Anywhere matches what we hear from our customers,” said Anand Ramanathan, VP of Product Management, McAfee Enterprise. “Giving customers a choice so they can engineer and manage their hybrid infrastructures using a unified dashboard and tooling consistent with Amazon EKS, enables customers to adopt hybrid infrastructures seamlessly. McAfee Enterprise supports these strategies with security from MVISION Cloud Native Application Protection Platform (CNAPP), which emboldens hybrid deployments in a manner that fits these strategies perfectly.”

DraftKings is a digital sports entertainment and gaming company created to fuel the competitive spirit of sports fans with products that range across daily fantasy, regulated gaming, and digital media. “We have a lot of workloads in the cloud, but we also have some in our own data centers, so it is essential that we have common infrastructure and tooling wherever possible,” said David Musicant, senior director, Architecture, DraftKings. “The vision for Amazon EKS Anywhere to provide strong operational consistency across the cloud and our data centers matches up with our needs. We look forward to working with AWS to explore the full potential of Amazon EKS Anywhere.”