The script sets up the components below.
- VPC CNI prefix mode
- Horizontal Pod Autoscaler
- A LimitRange
- Cluster Autoscaler
- Prometheus, Loki and Grafana
- AWS Load Balancer controller
- EKS container insights
- EFS CSI
- Create cluster
- Delete cluster
- Istio
Github repo is here.
The following needs to be installed on the machine the script is run on:
You select which components you wish to install by adding switches. The ones below are needed as parameters for various parts of the script.
./eks-init.sh -cluster my_cluster_name -region us-east-1 -aws_account 123456789
Other flags are as below:
-prefix_mode : Set up VPC CNI prefix mode
-hpa : Set up Horizontal Pod Autoscaler
-limit_range : Set up a Limitrange
-autoscaler : Install cluster autoscaler
-grafana : Set up Grafana
-insights : Set up EKS container insights
-create : Create a clsuter using eksctl
-nuke : <cluster_name> Delete cluster
-istio : Set up Istio
-lb_controller : Install the AWS Load Balancer Controller add-on
This has the dependencies below.
-iam_oidc : Create an IAM OIDC provider for your cluster
-ecr_repo : Amazon container image registry from here
So the cmd would be:
./eks-init.sh -cluster my_cluster_name -region us-east-1 -aws_account 123456789 -iam_oidc -ecr_repo 602401143452.dkr.ecr.us-east-1.amazonaws.com
-efs : Set up EFS CSI for cluster storage
This has the dependencies below:
-az1_mp <AZ1 Subnet ID for EFS Mount Point>
-az2_mp <AZ2 Subnet ID for EFS Mount Point>
./eks-init.sh -cluster my_cluster_name -region us-east-1 -aws_account 123456789 -efs -az1_mp subnet-123 -az2_mp subnet-456
You specify 2 subnets IDs in different AZs to be used for EFS mount points.
To install everything, you would use:
./eks-init.sh -cluster my_cluster_name -region us-east-1 -aws_account 123456789 -prefix_mode -hpa -limit_range -autoscaler -grafana -insights -lb_controller -iam_oidc -ecr_repo 602401143452.dkr.ecr.us-east-1.amazonaws.com -efs -az1_mp subnet-123 -az2_mp subnet-456 -istio
It may however be advisable to install one component at a time so that you can test to ensure everything is okay before installing the next component.
Top comments (0)