Skip to content

Migration from AWS Auto Scaling to Karpenter in Kubernetes infrastructure #1108

Closed

Description

@Rub21

I have been attending Kubernetes Conference last week in Lima, I saw a presentation about Karpenter and realized it could significantly improve our Kubernetes node scaling system.

Currently, we use AWS Auto Scaling Groups (ASG). While ASG works well, but I’ve noticed that both scale-up and scale-down operations can take some minutes. This delay not only impacts performance during sudden workload spikes but also leads to higher infrastructure costs due to slow node termination.

Karpenter offers a more responsive and cost-efficient approach, provisioning and deprovisioning nodes much faster and adapting to workload requirements dynamically. This can help us reduce costs, improve scalability speed, and simplify operational overhead.


Comparison: AWS Auto Scaling vs Karpenter

Feature AWS Auto Scaling (with Cluster Autoscaler) Karpenter Advantage for OHM
Node provisioning time 2–5 minutes (depends on ASG and Launch Template) ~1 minute or less Faster response to workload spikes and reduced pod scheduling delays
Instance type flexibility Fixed in Launch Template (low adaptability) Dynamic selection based on availability, price, and pod requirements No need to maintain multiple templates; always pick the optimal instance
Cost optimization May keep idle nodes longer before removal Quickly terminates unused nodes Lower cost from reduced idle time and better Spot usage
Spot Instance usage More complex and fixed per ASG Native integration with automatic Spot/On-Demand selection Potential 60–70% savings on compute
Variable workload handling Reactive scaling based on metrics (slower) Immediate scaling based on pending pods Better for unpredictable or spiky workloads
Operational management Requires ASG and Launch Template maintenance Only needs Provisioner rules Less time spent on operational upkeep
Scale-down efficiency Conservative; idle nodes may remain longer Aggressive and fast node termination Additional cost savings

Conclusion about Karpenter:

  • Reduces costs by removing idle nodes quickly and optimizing Spot usage.
  • Speeds up scaling with near-instant node provisioning.
  • Simplifies operations by removing the need for multiple ASGs and static templates.
  • Adapts better to workload changes, especially for unpredictable spikes.

I’ll leave this ticket in our log for now, and once we have some time, we can work on it. I think it’ll be important for improving how we manage workloads and control infrastructure costs.

Activity

  1. added
    infrastructure
    on Jul 30, 2025
  2. changed the title [-][Proposal] Migration from AWS Auto Scaling to Karpenter in Kubernetes infrastructure[/-] [+]Migration from AWS Auto Scaling to Karpenter in Kubernetes infrastructure[/+] on Oct 20, 2025
  3. Rub21 commented on Oct 22, 2025

    @Rub21
    MemberAuthor

    The ASG has been migrated to Karpenter. This configuration offers better adaptability to pod sizes, and I'm very confident we'll use fewer resources compared to ASG, along with faster response times under concurrent or high-demand traffic.
    Here are the PRs from the other repo related to this work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    infrastructure

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions