aws / karpenter-provider-aws

Karpenter is a Kubernetes Node Autoscaler built for flexibility, performance, and simplicity.
https://karpenter.sh
Apache License 2.0
6.68k stars 933 forks source link

One Subnet and Multiple EKS Cluster #6377

Closed aishwary05 closed 1 month ago

aishwary05 commented 3 months ago

Hi Team,

I am working on a project where I have only one subnet and multiple EKS clusters. And in the subnet, I'm updating the below tag. 

aws ec2 create-tags \ --tags "Key=karpenter.sh/discovery,Value=${CLUSTER_NAME}" \ --resources $SUBNETS          And whatever ${CLUSTER_NAME} is present in the tag, Karpenter will also work fine. So how can my Karpenter work for every cluster without changing tags every time.? 

Please get back to me for more information

aishwary05 commented 3 months ago

Hello Team Can someone please advise me on this?

binnythomas-corsearch commented 2 months ago

Can some one please update @lamdor @javier

binnythomas-corsearch commented 2 months ago

just use different tags.

aishwary05 commented 2 months ago

just use different tags.

Hi @binnythomas-corsearch, Thanks for the reply. But in tags, Key=karpenter.sh/discovery should be unique. and we cannot duplicate this.

Example: Below Example will not work aws ec2 create-tags \ --tags "Key=karpenter.sh/discovery,Value=${CLUSTER_NAME-1}" \ --resources $SUBNETS aws ec2 create-tags \ --tags "Key=karpenter.sh/discovery,Value=${CLUSTER_NAME-2}" \ --resources $SUBNETS

siddharthdeshmukh commented 2 months ago

We had similar setup and we updated the subnet tags to Key=karpener.sh/private-subnet,Value='true' and updated the subnetSelectorTerms to use this tag.

github-actions[bot] commented 1 month ago

This issue has been inactive for 14 days. StaleBot will close this stale issue after 14 more days of inactivity.