How to Configure Karpenter for Spot Instances in 2026

I built my first Kubernetes cluster in 2019. By 2022, I had five. By 2024, I was ripping three of them out. Not because Kubernetes is bad — because I was b...

configure karpenter spot instances 2026
By Nishaant Dixit
How to Configure Karpenter for Spot Instances in 2026

How to Configure Karpenter for Spot Instances in 2026

Stop 3AM Pages

Free K8s Audit

Get Started →
How to Configure Karpenter for Spot Instances in 2026

I built my first Kubernetes cluster in 2019. By 2022, I had five. By 2024, I was ripping three of them out. Not because Kubernetes is bad — because I was bleeding money on compute and my teams were drowning in node group management.

The tool that changed my mind? Karpenter. Specifically, Karpenter configured for spot instances.

Here's the thing most people get wrong: spot instances aren't about being cheap. They're about being smart about disruption. And Karpenter, when you configure it right, turns spot volatility into a feature, not a bug.

This guide isn't theory. I'm Nishaant Dixit, founder of SIVARO, and we've been running Karpenter in production since 2022. We process over 200K events per second across a mix of spot and on-demand. I've made every mistake you can make with this setup.

Let me save you the trouble.

Why Karpenter Beats the Cluster Autoscaler for Spot

Two years ago, I was still recommending the Cluster Autoscaler (CA) for most teams. Then Karpenter hit v1.0 stable in late 2024, and the math flipped.

The Cluster Autoscaler works at the node group level. It looks at pending pods, checks which node group has capacity, and scales up an entire EC2 instance. That's fine for on-demand. For spot? It's a disaster.

Spot interruptions hit individual instances. When an AZ gets reclaimed, CA has to spin up a whole new node group expansion. That takes 3-5 minutes. By then, your pods have been rescheduled three times and your SRE is paged at 3 AM.

Karpenter works at the pod level. It doesn't care about node groups. It watches scheduling constraints, picks the cheapest spot instance type that fits (across 40+ instance families), and launches it in under 60 seconds.

Most people think spot configuration is about pricing. It's not. It's about failure modes. Karpenter's failure mode is graceful. CA's is a cascade.

Prerequisites: What You Need Before Starting

Before you touch Karpenter, you need three things:

  1. Kubernetes 1.28+ — Karpenter uses the Node API heavily. Older versions of K8s have buggy node lifecycle management that'll cause phantom nodes.
  2. IAM permissions for EC2, Spot, and Instance Metadata — Karpenter needs ec2:RunInstances, ec2:CreateTags, and ec2:DescribeSpotPriceHistory. Give it least-privilege, but don't block Spot Fleet role creation.
  3. A clear understanding of your workload's interruption tolerance — If you have stateful workloads on spot, you're going to have a bad time. Stateless web services? Batch jobs? Perfect.

One thing I learned the hard way: Karpenter doesn't work well with Cluster Autoscaler running simultaneously. Pick one. Karpenter is the better choice for spot-heavy clusters.

Step 1: Install Karpenter with Helm

The official docs are good. But they assume you want on-demand. Here's the spot-focused install:

bash
helm repo add karpenter https://charts.karpenter.sh
helm upgrade --install karpenter karpenter/karpenter   --namespace karpenter   --create-namespace   --set serviceAccount.annotations."eks.amazonaws.com/role-arn"=arn:aws:iam::123456789:role/karpenter-controller   --set settings.aws.defaultInstanceProfile=KarpenterNodeInstanceProfile   --set settings.aws.interruptionQueueName=karpenter-interruption   --set settings.aws.reservedENIs=2

That interruptionQueueName flag is critical. It sets up an SQS queue that listens for EC2 Spot Instance Termination Notifications. Without it, Karpenter can't react to spot interruptions gracefully.

I've seen teams skip this and wonder why their pods get killed without warning. The queue gives you 2 minutes of notice before AWS reclaims the instance. Two minutes to drain, reschedule, and move on.

Step 2: Configure a Provisioner That Loves Spot

Here's where most tutorials fail. They show you a provisioner with a single spot option. That's like owning a Ferrari and only driving it to the grocery store.

A good spot provisioner gives Karpenter options:

yaml
apiVersion: karpenter.sh/v1beta1
kind: NodePool
metadata:
  name: default-spot
spec:
  template:
    spec:
      requirements:
        - key: karpenter.sh/capacity-type
          operator: In
          values: ["spot"]
        - key: node.kubernetes.io/instance-type
          operator: In
          values:
            - m5.large
            - m5.xlarge
            - m5.2xlarge
            - m6i.large
            - m6i.xlarge
            - m6i.2xlarge
            - m7g.large
            - m7g.xlarge
            - c5.xlarge
            - c5.2xlarge
            - c6i.xlarge
            - r5.xlarge
            - t3.xlarge
      nodeClassRef:
        group: karpenter.k8s.aws
        kind: EC2NodeClass
        name: spot-template
  limits:
    cpu: "100"
  disruption:
    consolidationPolicy: WhenUnderutilized
    expireAfter: 720h
---
apiVersion: karpenter.k8s.aws/v1beta1
kind: EC2NodeClass
metadata:
  name: spot-template
spec:
  amiFamily: Bottlerocket
  role: KarpenterNodeRole
  subnetSelectorTerms:
    - tags:
        karpenter.sh/discovery: my-cluster
        kubernetes.io/role/internal-elb: "1"
  securityGroupSelectorTerms:
    - tags:
        karpenter.sh/discovery: my-cluster
  tags:
    Name: karpenter-spot-node
    Environment: production

Notice the consolidationPolicy: WhenUnderutilized. That's the magic. Karpenter continuously looks for cheaper spot instance types and replaces nodes when it finds a better fit. This isn't just about cost — it's about adapting to spot market changes.

At SIVARO, we saw consolidation reduce our spot spend by 18% in the first month. AWS spot prices fluctuate by region and time of day. Karpenter rides those fluctuations automatically.

Step 3: Handle Spot Interruptions — The Part Everyone Skips

You've configured spot. You're saving money. Then a spot interruption hits and your service degrades.

The fix is three-fold:

3a. Use Pod Disruption Budgets

Without a PDB, Kubernetes will kill pods on a spot-terminated node instantly. With a PDB, it waits for the node to drain:

yaml
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: web-app-pdb
spec:
  minAvailable: 2
  selector:
    matchLabels:
      app: web-app

This keeps at least 2 replicas running during a spot interruption. Combined with Karpenter's 2-minute warning, you get a full drain cycle.

3b. Set Up a Graceful Shutdown Hook

Karpenter's interruption handler does the heavy lifting, but you need to prepare your pods:

yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: web-app
spec:
  replicas: 5
  template:
    spec:
      terminationGracePeriodSeconds: 120
      containers:
        - name: app
          image: myapp:latest
          lifecycle:
            preStop:
              exec:
                command: ["sh", "-c", "sleep 10 && /deregister-from-lb.sh"]

That 120-second grace period matches Karpenter's interruption notice window. Most teams set 30 seconds. That's not enough when spot interruptions are aggressive.

3c. Configure Node-level Taints

Spot nodes should be tainted to prevent non-spot-tolerant workloads from landing on them:

yaml
spec:
  template:
    spec:
      taints:
        - key: spot
          value: "true"
          effect: NoSchedule

Then add tolerations only to your spot-tolerant workloads. This prevents your critical databases from accidentally scheduling on a node that'll disappear.

How to Reduce Kubernetes Costs with Karpenter: The Real Numbers

I get asked this weekly: "How much can I actually save with Karpenter on spot?"

Here's real data from our SIVARO production cluster (March 2026):

  • Before Karpenter, on-demand only: $42,000/month for 3,000 CPU cores
  • After Karpenter, 70% spot: $24,000/month for the same workload
  • Savings: 43%

But here's the kicker: our latency improved by 7%. Why? Because Karpenter picks the fastest available spot instance type for each pod, not just the cheapest. We got better CPU architectures (Graviton3, Intel Ice Lake) automatically.

The reduction in Kubernetes costs with Karpenter isn't just about spot pricing. It's about right-sizing. The Cluster Autoscaler would spin up one instance type for a whole node group. Karpenter picks the exact instance for each pod. No waste.

Spot Instance Type Diversification — Your Insurance Policy

A single spot instance type can spike in price or get reclaimed aggressively. The fix is diversification.

I configure my provisioners with at least 10 instance types across 3 families:

  • General purpose (m5, m6i, m7g)
  • Compute optimized (c5, c6i, c7g)
  • Memory optimized (r5, r6i, r7g)

Karpenter ranks them by real-time spot price. If m5.large spot price jumps to 80% of on-demand, Karpenter picks c5.xlarge instead (which might be cheaper per vCPU in that moment).

The key insight: spot prices are inversely correlated across instance families. When m5 spot gets hot, c5 is usually cold. Diversification exploits this.

Fallback to On-Demand — When Spot Isn't Available

Fallback to On-Demand — When Spot Isn't Available

Spot instances aren't magic. Some regions have spot shortages. Some instance types are never available on spot.

Configure a fallback provisioner that matches your spot provisioner but allows on-demand:

yaml
apiVersion: karpenter.sh/v1beta1
kind: NodePool
metadata:
  name: spot-fallback
spec:
  template:
    spec:
      requirements:
        - key: karpenter.sh/capacity-type
          operator: In
          values: ["spot", "on-demand"]
        - key: node.kubernetes.io/instance-type
          operator: In
          values:
            - m5.large
            - m5.xlarge
            - m5.2xlarge
            # ... same list as above

Order matters. Karpenter tries spot first. If spot isn't available within 60 seconds, it falls to on-demand. Your pods don't wait.

Advanced: Prioritization and Weighting

Most teams don't need this. But if you have workloads that really don't like interruptions (but aren't fully stateful), you can weight instance types:

yaml
spec:
  template:
    spec:
      requirements:
        - key: karpenter.sh/capacity-type
          operator: In
          values: ["spot"]
        - key: karpenter.sh/instance-type-hypervisor
          operator: In
          values: ["nitro"]

Nitro-based instances (all current-gen AWS instance types) get a 10-minute spot interruption warning instead of 2 minutes. For workloads that need a little more breathing room, this is a game-changer.

Monitoring Karpenter Spot Performance

You can't configure what you can't measure. Here's what I track:

  1. Spot interruption rate — How many spot terminations per day. Over 5% of your provisioned capacity? Your diversification is weak.
  2. Spot vs on-demand ratio — Should be 70-80% spot in most regions for non-stateful workloads.
  3. Node launch time — Karpenter should launch nodes in under 90 seconds. Over 3 minutes? Something's wrong with your AMI or subnet configuration.
  4. Consolidation savings — How much Karpenter's continuous optimization saves you monthly.

Set up Prometheus alerts for these. Grafana dashboard them. If spot interruption rate spikes above 10%, you need to add more instance types.

Real Talk: When NOT to Use Spot Instances

I'm a pragmatist, not a zealot. Here's where spot fails:

  • Stateful workloads with persistent volumes — PVs don't survive spot terminations. Use EBS snapshots or external storage.
  • Batch jobs that run for 6+ hours — AWS gives you a 2-minute warning. Your 6-hour job doesn't fit.
  • Compliance workloads — Some regulations require reserved capacity. Spot doesn't give you that.
  • Latency-sensitive applications under 5ms — The cost savings might not be worth the jitter.

At SIVARO, we use spot for stateless microservices, CI/CD runners, and batch processing. Stateful stores (PostgreSQL, Redis) stay on on-demand with reserved instances.

The debate about whether companies should leave Kubernetes entirely is relevant here. Some teams have deleted Kubernetes from 70% of their services because they couldn't manage complexity. Spot configuration is one of those complexities. If your team can't handle Karpenter lifecycle management, maybe Kubernetes isn't the right tool.

That said, Kubernetes isn't dead — you just misused it. The problem isn't K8s. It's treating it like a magic box. Karpenter is a power tool, not a cure-all.

Troubleshooting Common Spot Configuration Issues

"Karpenter isn't launching spot instances"

Check three things:

  • Your NodePool has values: ["spot"] (not "Spot" — case matters)
  • Your EC2NodeClass subnet tags match your actual subnets
  • Your IAM role has ec2:RunInstances for spot

"Spot instances are being terminated too quickly"

You're probably not using PodDisruptionBudgets. Or your instance type diversity is too narrow. Add 5-10 more types.

"Karpenter is spending more on on-demand than expected"

This happens in us-east-1a and us-east-1b — those AZs have the highest spot demand. Move some pods to us-east-1c or us-west-2. Or increase your spot instance type list to include more rare types (m7g, r7g, c7g).

The Future: Karpenter in 2026 and Beyond

As of July 2026, Karpenter 1.2 is in beta with several features I can't talk about yet publicly. But the direction is clear: tighter integration with AWS Spot Fleet APIs, predictive interruption modeling, and cross-region spot arbitrage.

Some teams are leaving Kubernetes entirely, moving to Lambda or Fargate for simplicity. They have a point. If you're running 5 microservices, Karpenter is overkill. But if you're running 50+ services with varying resource profiles? Karpenter on spot is the most cost-effective compute model in AWS.

Conclusion: Go Configure Karpenter for Spot Instances

The setup takes an afternoon. The savings last forever.

Here's your checklist:

  1. Install Karpenter with interruption queue
  2. Create a diversified spot provisioner with 10+ instance types
  3. Set up PodDisruptionBudgets on all workloads
  4. Configure graceful shutdown hooks
  5. Monitor spot interruption rate
  6. Add on-demand fallback
  7. Test with a spot-simulated termination (AWS Fleet Manager can do this)

I've been running production systems on spot since 2022. The fear is overblown. Karpenter handles the complexity. Your job is to configure it correctly.

The reason most teams fail at spot? They don't trust the automation. They over-constrain it. They limit instance types. They set strict zone restrictions. Karpenter works best when you give it more freedom, not less.

How to configure Karpenter for spot instances isn't a mystery anymore. It's a solved problem. The question is whether you'll actually implement it.

I've seen teams save $100K+/year by following these patterns. Start with one workload. Measure the savings. Then expand.

Your cloud bill will thank you.


Nishaant Dixit — Founder of SIVARO. Building data infrastructure and production AI systems since 2018. Built systems processing 200K events/sec.

FAQ

FAQ

How does Karpenter differ from the Cluster Autoscaler for spot instances?

Karpenter operates at the pod level, selecting the cheapest spot instance type for each pod's constraints. The Cluster Autoscaler works at the node group level, scaling up entire node types. Karpenter launches nodes in under 60 seconds vs CA's 3-5 minutes, and handles spot interruptions gracefully through SQS queues.

Can I use Karpenter with existing node groups?

Not recommended. Karpenter works best when it has full control over node lifecycle. Running it alongside the Cluster Autoscaler causes conflicting scaling decisions. Migrate to Karpenter-only for spot workloads.

How do I prevent critical workloads from landing on spot instances?

Use taints on spot nodes (spot=true:NoSchedule) and tolerations only on spot-tolerant workloads. This keeps databases and stateful apps on on-demand or reserved instances.

What happens when Karpenter can't find spot instances in my region?

Configure a fallback provisioner that allows both spot and on-demand. Karpenter tries spot first, falls to on-demand within 60 seconds. Your pods don't wait.

How often should I review my spot instance type list?

Every quarter. New instance types launch frequently. AWS introduced the m7g and r7g families in late 2025 — they're often cheaper and faster than older gen types. Update your provisioner's values list.

Will spot instances cause service disruption for web applications?

With proper PodDisruptionBudgets and graceful shutdown hooks, most web applications handle spot interruptions flawlessly. Test with a simulated spot termination to verify your setup.

How much can I reduce Kubernetes costs with Karpenter?

Expect 30-50% cost reduction compared to on-demand only, depending on your workload mix and region. SIVARO's production cluster saw 43% savings while improving latency by 7%.

Is Karpenter worth it for small clusters?

Probably not. If you have fewer than 10 nodes, the operational overhead of managing Karpenter exceeds the savings. Use AWS Fargate or ECS for small setups — simpler, less complexity.

Free · No Commitment · 48-Hour Delivery

Get a free infrastructure audit

2-hour remote session. We audit your data infrastructure, identify what's costing you time and money, and deliver a written roadmap with specific, measurable targets. No pitch.

Book Your Free Audit
N
Nishaant Dixit
Founder & Lead Engineer at SIVARO

Building data-intensive systems since 2018. 200K events/sec pipelines, production RAG systems, Kubernetes infrastructure. LinkedIn →

Start a Project
Need help with infrastructure?

Kubernetes, Karpenter, DevOps pipelines, and container orchestration for production workloads.

Explore MVP to Production