Deploying on Amazon Elastic Kubernetes Service (EKS)
This guide walks you through deploying and managing HATS applications on Amazon Web Services (AWS), a cloud platform that enables seamless scaling and container management in a cluster environment. Amazon EKS is a managed service that simplifies running Kubernetes clusters in the AWS and on-premises cloud. With EKS, you can efficiently deploy, scale, and manage containerized applications.
Prerequisites:
-
AWS Account
-
AWS Command Line Interface (CLI)
-
Access to AWS Management Console
- Install eksctl, a command-line tool for managing Amazon EKS clusters
- Install kubectl
- Install Helm version 3
Create an EKS cluster
To deploy the HATS application on AWS, a user must create an EKS cluster and Node group:
- Create an EKS Cluster.
eksctl create cluster --name=HatsCluster --region=us-east-1 - Create a Node Group.
eksctl create nodegroup --cluster=HatsCluster --region=us-east-1 --node-type=t3.medium --nodes=2 --nodes-min=2 --nodes-max=2 - Update kubeconfig to Interact with the EKS Cluster.
aws eks --region us-east-1 update-kubeconfig --name HatsCluster
For more details, refer to the AWS EKS Cluster Creation Guide.
Installing AWS Load Balancer Controller
An Application Load Balancer (ALB) is recommended for HATS to ensure efficient traffic distribution and enhance application performance, availability, and reliability. Follow the steps below to install the AWS Load Balancer Controller for Amazon EKS using Helm.
Install AWS Load Balancer Controller with Helm - Amazon EKS.
Persistent Storage with AWS EFS for Amazon EKS
To support scalable and shared storage for your HATS applications on Amazon EKS, we recommend using AWS Elastic File System (EFS) as persistent storage. EFS allows multiple pods to access the same data, essential when enabling scaling across nodes.
https://docs.aws.amazon.com/eks/latest/userguide/efs-csi.html.
HELM Chart to Deploy HATS Application on AWS:
Download the HELM chart from here and modify below parameters.
| Parameters | Description | Value |
|---|---|---|
| repository | Repository name of HATS Application in AWS | AWS repository |
| pullPolicy | image pull policy | IfNotPresent |
| tag | image tag | latest |
| service.type | type of the service | ClusterIP |
| service.port | port for the service | 9080 |
Ensure the AWS Load Balancer and EFS are fully set up and verified before proceeding with the HATS application deployment.
Deploy HATS Application with Helm
- Install the Helm Chart:
helm install <release-name>Replace <release-name> with your desired release name for the HATS application.
- Accessing the HATS Application:
- Obtain the IP address of the Ingress
controller:
kubectl get ingress
- Use the following URL to access your HATS application:
http://<IngressIPAddress>/HatsProjName
Example: http://k8s-default-hats-ce0eb0e589-582617613.us-east-1.elb.amazonaws.com/HatsProj
- Obtain the IP address of the Ingress
controller:
Deleting the EKS Cluster and Resources
After completing your work, you can delete the EKS cluster along with resources like the load balancer and EFS.
For detailed steps, refer to AWS’s EKS Cluster Deletion Guide.