26
loading...
This website collects cookies to deliver better user experience
Attaching the nodes IAM policy with appropriate permissions.
Creating an IAM user and create Kubernetes secrets and attaching the secrets to Cluster AutoScaler Deployment.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"autoscaling:DescribeAutoScalingGroups",
"autoscaling:DescribeAutoScalingInstances",
"autoscaling:DescribeLaunchConfigurations",
"autoscaling:SetDesiredCapacity",
"autoscaling:DescribeTags",
"autoscaling:TerminateInstanceInAutoScalingGroup"
],
"Resource": [
"*"
]
}
]
}
kubectl CLI
Kubernetes Cluster (v.1.14.0+ preferably)
Metrics Server (The Complete Guide on Metrics Server? -> link )
Clone the Github repo **https://github.com/chrisedrego/clusterautoscaler**
**compute/vcpu:** 2vcpu
**memory:** 4Gi
export KOPS_STATE_STORE='s3://STATE_STORE_URL'
export KOPS_CLUSTER_NAME='CLUSTER_NAME'
kops create -f ./kops/test-node.yaml
kops update cluster --yes
kops rolling-update cluster --yes
***# Specify the new Instance Group Name***
INSTANCE_GROUP=''
aws autoscaling describe-auto-scaling-groups | grep $INSTANCE_GROUP
***# Check if new nodes are added***
kubectl get nodes
Single Auto-Scaling Group
Multiple Auto-Scaling Group
On-Control Plane (on the master nodes)
Autodiscover (auto-discover using tags)
- --skip-nodes-with-local-storage=false
- --nodes=**<MIN_COUNT>:<MAX_COUNT>:<INSTANCE_GROUP>**
Make sure before applying the min-count and max-count should be between the actual range of InstanceGroup.
kubectl scale deploy test-app --replicas=2
26