EKS is the service that AWS provides to integrate Kubernetes into their Infrastructure. At Ensolvers we are implementing new projects over the latest Cloud experiences for infrastructure, being Kubernetes the current spearhead of that evolution.
This document presumes that the reader knows how to build Kubernetes locally and understands basic AWS tools like Cloudformation and AWS CLI.
In the experience we had so far, integrating with EKS requires interactions between Kubernetes, EKS and generic AWS tools that aren’t completely clear for a newcomer. This doc tries to clarify the basic set of steps to reach a first successful deployment on EKS.
We can define the process of building and deploying as two different sections. First, we need to create an EKS environment, and later, we are going to understand how to deploy new images into the Cluster.
After ensuring we have the awscli tools configured, we need to create a new environment including VPC and Subnets, we only need to execute a single instruction on eksctl for doing that:
This command will create Templates on CloudFormation to be deployed, creating the barebones required for a Kubernetes cluster. These templates are good blueprints if, eventually, we want to create our own custom Templates, for example, when we have to create the cluster in an existing VPC. In this case, we are going to use AWS Fargate as the underlying computing platform.
The process of doing Ci/CD on EKS depends on AWS CLI. Once we build the image with Docker, we have to modify the environment to make sure that it points to the EKS Cluster.
This command is crucial to make sure that the deployment of Kubernetes points to EKS.. You can run the following command to verify where the context is pointing to.
Once the context for Kubernetes points to the cluster, we can then run kubectl to run the deploy
To verify the healthcheck of the pods, we then run:
In this post we've described a quick guide to core steps to set up a cluster in EKS. In our experience, we've found out that the documentation is not concrete enough to get things ready quickly, specially since several CLI and tools are involved. At Ensolvers we use this steps internally so set up new clusters in our projects.