DEV Community

DevOpsCloudCloud
DevOpsCloudCloud

Posted on • Edited on

[AWS EKS] set Autoscaler

Deploy the autoscaler

step1

kubectl apply -f https://raw.githubusercontent.com/kubernetes/autoscaler/master/cluster-autoscaler/cloudprovider/aws/examples/cluster-autoscaler-autodiscover.yaml

step2

kubectl -n kube-system annotate deployment.apps/cluster-autoscaler cluster-autoscaler.kubernetes.io/safe-to-evict="false"

step3

set your EKS cluster name at the end of property - --node-group-auto-discovery=asg:tag=k8s.io/cluster-autoscaler/enabled,k8s.io/cluster-autoscaler/<<EKS cluster name>>

set the image version at property image: asia.gcr.io/k8s-artifacts-prod/autoscaling/cluster-autoscaler:v1.18.1

see logs

kubectl -n kube-system logs deployment.apps/cluster-autoscaler

IAM-Policy for worker-nodes Auto scaling

IAM -> policies -> Create policy

attach policy in role of worker node for auto scaling
Alt Text

Top comments (0)