DEV Community

Internet Explorer
Internet Explorer

Posted on

Karpenter to EKS Auto Mode, worth it?

Image description

EKS Auto Mode vs Karpenter: Time to Make the Switch?

Hey there, Kubernetes folks! If you're running K8s on AWS, you've probably gotten pretty cozy with Karpenter for managing your nodes. But there's a new kid on the block - Amazon EKS Auto Mode - and it's got some pretty sweet tricks up its sleeve. Let's dive into what makes it special and how you might want to test it out.

Why Auto Mode Caught My Eye

Look, Karpenter's great at what it does, but Auto Mode takes things to another level. Here's what got me excited:

AWS Does the Heavy Lifting (Finally!)

Remember all that time you spent picking instance types and managing patches? Auto Mode says "I got this." It runs everything on BottleRocket OS, handles patches automatically, and even figures out the best node sizes for you. Got ML workloads? It'll handle those NVIDIA and Neuron GPUs without breaking a sweat.

Production-Ready Without the PhD

Here's what's cool - you don't need to be a K8s wizard anymore. The nodes come pre-baked with everything you need. Sure, you can't SSH in anymore, but let's be honest - if you're SSH-ing into your nodes, something's probably gone wrong anyway. 😅

It's Smarter Than Your Average Bear

Auto Mode doesn't just add and remove nodes - it actually watches what your apps are doing and makes smart decisions. Got pods that could run more efficiently somewhere else? It'll shuffle things around and shut down the extra nodes. Your finance team will love you!

Security on Autopilot

Instead of that recurring calendar reminder to update your nodes (that we all totally never ignore, right?), Auto Mode automatically rotates them every 21 days max. Fresh nodes, fresh security patches, no manual work. And don't worry - it plays nice with your Pod Disruption Budgets.

The Kitchen Sink's Included

All those add-ons we usually have to wrestle with? They're built right in. EBS CSI driver? Check. VPC CNI? Yup. CoreDNS? You bet. It's all there and pre-configured the AWS way.

Want to Take It for a Spin?

Here's how you can dip your toes in without diving headfirst:

  1. First, make sure you're running Karpenter v1.1+ (and obviously have kubectl access).

  2. Create a test NodePool (it's tainted so your regular workloads won't accidentally land there):

apiVersion: karpenter.sh/v1
kind: NodePool
metadata:
  name: eks-auto-mode-test
spec:
  template:
    spec:
      requirements:
        - key: "eks.amazonaws.com/instance-category"
          operator: In
          values: ["c", "m", "r"]
      nodeClassRef:
        group: eks.amazonaws.com
        kind: NodeClass
        name: default
      taints:
        - key: "eks-auto-mode"
          effect: "NoSchedule"
Enter fullscreen mode Exit fullscreen mode
  1. Update your test deployments to use the new nodes:
apiVersion: apps/v1
kind: Deployment
spec:
  template:
    spec:
      tolerations:
        - key: "eks-auto-mode"
          effect: "NoSchedule"
      nodeSelector:
        eks.amazonaws.com/compute-type: auto
Enter fullscreen mode Exit fullscreen mode

The Fine Print

Before you jump in, here's what you should know:

  • You'll need to use AWS's AMIs - no custom stuff allowed
  • Nodes will rotate every 14-21 days (it's a feature, not a bug!)
  • You can still use DaemonSets, custom NodePools, and all your favorite K8s objects
  • Manage everything through your tool of choice: eksctl, AWS CLI, Console, or your trusty IaC setup

Tips for Success

Once you're up and running:

  1. Spread your workloads across AZs using Pod Topology Spread
  2. Keep an eye on things with CloudWatch
  3. Set up those Pod Disruption Budgets (your future self will thank you)
  4. Trust the process - resist the urge to mess with nodes manually
  5. Use custom NodePools when you really need them, not just because you can

Making the Switch

No need to go all-in right away. Start small:

  1. Pick some non-critical workloads to test
  2. Watch how things perform
  3. Gradually move more stuff over
  4. Keep Karpenter around until you're ready to say goodbye

Wrapping Up

While Karpenter's been a solid friend, EKS Auto Mode feels like the future of cluster management. The automation is impressive, security's baked in, and it just... works. But hey, don't take my word for it - give it a try and see for yourself!

Drop a comment below if you've played with Auto Mode - I'd love to hear how it's working for you!


About me: Just another cloud engineer who gets way too excited about infrastructure automation. Currently living the container life, trying to make the cloud play nice at scale.

Top comments (0)