SM
SM4527/EKS-Metrics-server
Deploy Metrics server on an EKS cluster using Terraform & Helm.
Project Title
Description
Deploy Metrics server on an EKS cluster using Terraform and Helm.
Getting Started
Dependencies
- Docker
- AWS user with programmatic access and high privileges
- Linux terminal
- Deploy an EKS K8 Cluster with Self managed Worker nodes on AWS using Terraform.
Installing
- Clone the repository
- Set environment variable TF_VAR_AWS_PROFILE
- Review terraform variable values in variables.tf, locals.tf
- Override values in the Helm chart through the "chart_values.yaml" file
- Update kubernetes.tf with the AWS S3 bucket name and key name from the output of the EKS K8 Cluster
Executing program
- Configure AWS user with AWS CLI.
docker-compose run --rm aws configure --profile $TF_VAR_AWS_PROFILE
docker-compose run --rm aws sts get-caller-identity
- Specify appropriate Terraform workspace.
docker-compose run --rm terraform workspace show
docker-compose run --rm terraform workspace select default
- Run Terraform apply to create the EKS cluster, k8 worker nodes and related AWS resources.
./run-docker-compose.sh terraform init
./run-docker-compose.sh terraform validate
./run-docker-compose.sh terraform plan
./run-docker-compose.sh terraform apply
- Verify kubectl calls and ensure Metrics server Pod is in Running status.
./run-docker-compose.sh kubectl get pods -A | grep -i metric
- Check out top nodes and pods by CPU & Memory consumption on the EKS cluster.
./run-docker-compose.sh kubectl top node
./run-docker-compose.sh kubectl top pod -A
Help
- metrics-server is unable to authenticate to apiserver
Issue: kubectl top node and pod shows unknown instead of perencentage. The pod log and event has the error: dial tcp ip_address: i/o timeout
Fix:
Check chart_values.yaml
Reference: kubernetes-sigs/metrics-server#278
Authors
Version History
- 0.1
- Initial Release
License
This project is licensed under the MIT License - see the LICENSE file for details
Repo rosters
Stargazers
On this page
Languages
HCL89.3%Shell10.7%
Contributors
MIT License
Created January 28, 2022
Updated November 16, 2023
