added annotation to the service account and env var for region

This commit is contained in:
Amit Gujar 2025-07-08 23:07:37 +05:30
parent 40b429081f
commit f94c14d0f7
1 changed files with 5 additions and 0 deletions

View File

@ -5,6 +5,8 @@ metadata:
labels:
k8s-addon: cluster-autoscaler.addons.k8s.io
k8s-app: cluster-autoscaler
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::<account_number>:role/<YOUR_IAM_ROLE_NAME>
name: cluster-autoscaler
namespace: kube-system
---
@ -163,6 +165,9 @@ spec:
- --skip-nodes-with-local-storage=false
- --expander=least-waste
- --node-group-auto-discovery=asg:tag=k8s.io/cluster-autoscaler/enabled,k8s.io/cluster-autoscaler/<YOUR CLUSTER NAME>
env:
- name: AWS_REGION
value: ap-south-1 # Change to your AWS region
volumeMounts:
- name: ssl-certs
mountPath: /etc/ssl/certs/ca-certificates.crt # /etc/ssl/certs/ca-bundle.crt for Amazon Linux Worker Nodes