- TechOps Examples
- Posts
- KEDA vs Karpenter - Which One to Choose
KEDA vs Karpenter - Which One to Choose
Good day. It's Thursday, Aug. 29, and in this issue, we're covering:
KEDA vs Karpenter - Which One to Choose ?
Google Cloud Announces Terraform Google Provider 6.0.0
How Monzo run migrations across 2,800 microservices
Runtime anomaly detection in Kubernetes
How to Create Dockerfiles with GenAI
Terraform with GitHub Actions : How to Manage & Scale
You share. We listen. As always, send us feedback at [email protected]
Before moving ahead....a great news ✋
We partnered with Oneleet to bring you this offering.
Want SOC 2 compliance without the Security Theater?
Question 🤔 does your SOC 2 program feel like Security Theater? Just checking pointless boxes, not actually building security?
In an industry filled with security theater vendors, Oneleet is the only security-first compliance platform that provides an “all in one” solution for SOC 2.
We’ll build you a real-world Security Program, perform the Penetration Test, integrate with a 3rd Party Auditor, and provide the Compliance Software … all within one platform.
Use Case
KEDA vs Karpenter - Which One to Choose?
Kubernetes practitioners often find themselves unsure whether to choose KEDA or Karpenter, as both offer valuable but distinct approaches to scaling within their clusters.
Let’s understand the basics first..
KEDA:
Specializes in scaling your applications based on external event sources, making it perfect for workloads that need to respond to specific events like messages in a queue.
KEDA workflow
KEDA receives events from sources like Kafka or RabbitMQ.
The KEDA operator processes these events using its metrics adapter, controller, and scaler.
Metrics are sent to the Kubernetes API server.
Kubernetes API server communicates with the Horizontal Pod Autoscaler (HPA).
HPA adjusts the number of pods in your deployments based on these metrics.
Karpenter:
Automatically provisions new nodes specifically when unscheduled pods are detected, ensuring your cluster scales efficiently by adding the exact resources needed.
Karpenter Workflow
Karpenter detects unscheduled pods in the cluster.
The Karpenter controller defines the provisioning requirements using the Provisioner CRD.
It interacts with the cloud provider API to provision new nodes.
Once the nodes are ready, the Kubernetes scheduler assigns the unscheduled pods to these new nodes.
Quick Setup Comparison:
KEDA Sample Configuration:
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: my-scaledobject
spec:
scaleTargetRef:
name: app-deployment
triggers:
- type: kafka
metadata:
bootstrapServers: my-kafka-broker:9092
topic: my-topic
consumerGroup: my-group
lagThreshold: "10"
Karpenter Sample Configuration:
apiVersion: karpenter.sh/v1alpha5
kind: Provisioner
metadata:
name: default
spec:
cluster:
name: top-cluster
requirements:
- key: "node.kubernetes.io/instance-type"
operator: In
values: ["m5.large", "m5.xlarge"]
limits:
resources:
cpu: 1000
When to Use:
KEDA: Ideal for event-driven workloads. If your application scales based on external events or metrics like queue length, Kafka messages, or custom metrics, KEDA integrates seamlessly.
Real-life Applications: Processing orders in e-commerce platforms, handling IoT sensor data, or managing email notifications.
Karpenter: Perfect for dynamic infrastructure scaling. If you need to scale your cluster by adding or removing nodes based on the demands of unscheduled pods, Karpenter is your go-to.
Karpenter efficiently manages cluster capacity, ensuring the right resources are available when workloads fluctuate.
Real-life Applications: Running AI/ML workloads, handling video rendering jobs, or scaling cloud gaming servers.
The right choice depends on the specific needs of your workloads and cluster management strategy.
p.s. if you think someone else you know may like this newsletter, share with them to join here
Tool Of The Day
DALEC - Produce secure packages 📦 and containers with declarative configurations
Trends & Updates
Resources & Tutorials
Picture Of The Day
Still relevant today 😀
Did someone forward this email to you? Sign up here
Interested in reaching smart techies?
Our newsletter puts your products and services in front of the right people - engineering leaders and senior engineers - who make important tech decisions and big purchases.