Two Karpenter pools, spot-first for services and spot-only for Spark executors
How Adhesive splits its EKS capacity into a general pool and a tainted spot pool, why the limits come from account quotas, and what the setup does not protect against.
22 November 2026, 4 min read
- Karpenter
- Spot
- EKS
- Spark
- Kubernetes
Adhesive runs a lot of software on a small budget: Airflow, Kafka, Elasticsearch, OpenMetadata, Prometheus and Spark. The capacity layout is simple. Two nodes stay on-demand to run controllers. Everything else is provisioned by Karpenter from two NodePools. This post walks through them and the reasons behind each setting.
The layout
- System nodes. A managed node group of two
m7i-flex.largeon-demand nodes, taintedCriticalAddonsOnly. They run the controllers, including Karpenter itself, so Karpenter never depends on capacity it has to create. generalpool. Spot and on-demand allowed. It runs services and Spark drivers.sparkpool. Spot only, labelledworkload: sparkand taintedworkload=spark:NoSchedule. It runs Spark executors.
The general pool
requirements:
- { key: karpenter.sh/capacity-type, operator: In, values: [spot, on-demand] }
- { key: node.kubernetes.io/instance-type, operator: In, values: [m7i-flex.large, c7i-flex.large] }
expireAfter: 24h
limits:
cpu: "24"
memory: 96Gi
disruption:
consolidationPolicy: WhenEmptyOrUnderutilized
consolidateAfter: 1m
Allowing both capacity types lets Karpenter use spot when it is available and fall back to on-demand when it is not. The pool can grow to 12 nodes at most.
That limit is not a guess. It comes from the account: 16 on-demand vCPUs (4 used by the system nodes) and 32 spot vCPUs. A comment in the manifest records the arithmetic, because a limit nobody can explain gets changed by accident. The limit also caps the worst-case bill, which matters when the whole project is meant to cost under about $1 an hour.
consolidateAfter: 1m means empty or underused nodes are removed after one minute. For a stack that is brought up for a session and torn down the same day, a long idle window is just money. expireAfter: 24h recycles nodes daily so none of them drifts for long.
The spark pool
The Spark pool is spot only, so an executor can never silently land on an on-demand node. Its limits are 8 vCPUs and 32 GiB, and the manifest notes that it shares the 32 vCPU spot quota with the general pool (24 + 8). The two limits are sized to add up to the quota, so the pools cannot starve each other of quota at the cloud provider.
The taint keeps other workloads off these nodes. In the SparkApplication template, only executors opt in:
executor:
nodeSelector:
workload: spark
tolerations:
- { key: workload, operator: Equal, value: spark, effect: NoSchedule }
driver:
nodeSelector:
karpenter.sh/nodepool: general
The driver stays in the general pool. Executors are the right thing to put on spot: they are numerous, short-lived and replaceable, and Spark retries lost executors. A driver holds the job's state, so losing it loses the job.
What this does not guarantee
I want to be exact about the limits of this design.
- The driver can still be on spot. The general pool allows spot, and Karpenter prefers spot when it can get it. Nothing in the manifests pins drivers to on-demand. If a spot interruption hits a driver node, that run fails. Retries are handled by Airflow, not by the pool layout.
- Interruption is handled, not avoided. Karpenter watches an SQS interruption queue so it can drain nodes ahead of a spot reclaim. That shortens the damage but does not remove it.
- No measured savings. I have not measured spot utilization or a cost reduction against an on-demand baseline for this project, so I do not claim one. The only cost figure is a planning estimate of about $0.55–0.70 an hour.
- Two instance types is narrow.
m7i-flex.largeandc7i-flex.largeare there because the account is on a plan that can launch only free-tier-eligible types. On a normal account I would allow many more families, because a wider list gives spot more places to find capacity.
Keeping an eye on it
Prometheus scrapes Karpenter, and the repository ships a Grafana dashboard for it. One alert, KarpenterNodesNotReady, fires when any node has not been Ready for 10 minutes. Its comment records a limitation: kube-state-metrics does not expose node ownership as a label, so the alert covers every node, not only Karpenter's.
The takeaway
Separate pools are cheap to add and make intent visible in the manifests. One pool is for things that must stay up, and one is for work that can be redone. Setting the limits from real account quotas turns "the cluster scaled out of control" from a surprise into something that cannot happen.