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 934 forks source link

Karpenter Replica Issue on Kubernetes #7141

Open dextercrypt opened 1 day ago

dextercrypt commented 1 day ago

Description

Observed Behavior: Karpenter helm Chart deploys by default 2 replica of Karpenter.

Both should run fine if its a default value.

Expected Behavior:

One of the Replica always says this issue:

{"level":"INFO","time":"2024-10-01T20:25:27.649Z","logger":"controller","message":"attempting to acquire leader lease kube-system/karpenter-leader-election...","commit":"62a726c"}

While another one works and does it work? Can we just run 1 pod then?

Reproduction Steps (Please include YAML):

Versions:

jmdeal commented 1 day ago

By it's nature Karpenter doesn't horizontally scale (hence the leader election), but multiple replicas help ensure high availability. For example, there could be an AZ outage but since the replicas are in different AZs, the unaffected replica will be able to take over and continue operating. You're free to reduce the replica count, Karpenter will still function, but we recommend running multiple replicas spread across AZs.