This part of the repository adds the Horizontal Pod Autoscaler for the AWS EKS cluster.
- Provisioned EKS Cluster: Baseline Architecture.
- Connection to the cluster (via
aws eks --region us-east-2 update-kubeconfig --name eks-cluster
). - AWS CLI - A command line tool for interacting with AWS services.
- kubectl - A command line tool for working with Kubernetes clusters.
- Deploy application to the AWS EKS Cluster:
kubectl create -f TeaStore\teastore-hpa.yaml
. - Deploy Metrics Server:
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
. - Check if Metrics Server is running:
kubectl get deployment metrics-server -n kube-system
. - Create HPA by running
Terraform apply
and confirm withyes
.
The TeaStore application already provides load testing scripts for Apache Apache JMeter. To test the scaling functionality:
- Install JMeter (Installation).
- Open the GUI (bin/apacheJmeter.jar).
- Open JMeter file.
- Adjust the webpage endpoint (DNS of Load Balancer) (Call
kubectl get services
-> External IP of teastore-webui ). - Start Thread group 3 (including several http requests).
- Monitor via kubectl (-n teastore-namespace) get pods.
- Stop the load testing.
- Delete application
kubectl delete -f Teastore\teastore-hpa.yaml
. - Delete Policies:
Terraform destroy
confirm withyes
. (Within this folder) - Delete Cluster:
Terraform destroy
confirm withyes
. (Within the Baseline Arhcitecture Folder)