Now that you have a solid understanding of Kubernetes and have defined the core resources required to deploy and run the todobackend application locally, it is time to shift our attention to the Elastic Kubernetes Service (EKS).
The core resource supported by EKS is the EKS cluster, which represents a fully managed, highly available cluster of Kubernetes managers that take care of the Kubernetes control plane for you. In this section, we will focus on creating an EKS cluster in AWS, establishing authentication and access to the cluster, and deploying the Kubernetes dashboard.
Creating an EKS cluster consists of the following primary tasks:
- Install client components: In order to manager your EKS cluster, you need to install various client components, including kubectl (which you have already installed) and the AWS IAM authenticator for Kubernetes tool.
- Create cluster resources: This establishes the control plane component of Kubernetes, which consists of Kubernetes masters. When using EKS, the masters are provided as a fully managed service.
- Configure kubectl for EKS: This allows you to manage EKS using your local kubectl client.
- Create worker nodes: This consists of Kubernetes nodes that are intended to run your container workloads. When using EKS, you are responsible for creating your own worker nodes, which you will typically deploy in the form of EC2 auto scaling groups. Just like for the ECS service, AWS provides an EKS-optimized AMI (https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html) that includes all of the necessary software components for a worker node to join your EKS clusters.
- Deploy the Kubernetes dashboard: The Kubernetes dashboard provides you with a web-based management interface to manage and monitor your cluster and container applications.
At the time of writing, EKS clusters are not part of the AWS free tier and cost $0.20 USD per minute to run, so bear this in mind before you continue (see https://aws.amazon.com/eks/pricing/ for latest pricing information). We will be using CloudFormation templates to deploy both the EKS cluster and EKS worker nodes, so you can easily tear down and recreate your EKS cluster and worker nodes as required to reduce costs.