Kubernetes node pools
A cluster's workers come in node pools. Every worker of a pool has the pool's size and zone, and joins the cluster with the pool's labels and taints. Use pools to give each workload the machines it needs: large workers for a database, small ones for everything else, or a pool kept for one team.
A cluster starts with the pools you set up in the Node pools step when you create it: the first is named default unless you rename it, and you can add more there, within your plan's workers per cluster. See Create a cluster.
Manage node pools
Open the cluster and go to Nodes. The Node pools table lists each pool's size, zone, how many of its workers are ready, its labels and taints, and its state.
- Add node pool: choose a name, a worker size, a zone and how many workers, and optionally labels and taints. The dialog shows the price per worker and a pay-as-you-go estimate for the pool's workers: see Kubernetes pricing and usage.
- Edit: change the number of workers, the labels or the taints. The name, size and zone stay as they are; to change them, add a new pool and delete the old one.
- Delete: drains the pool's workers and removes them, then the pool.
Owners, admins and developers can manage node pools. Viewers can see them.
The cluster shows Updating while a change applies, and keeps serving the whole time. New workers join with their pool's labels and taints, so nothing is scheduled on them before those apply. When workers leave because you lowered a count, the cluster keeps a worker in every zone that holds one of its volumes as long as the count allows it, removes workers that are not ready yet or have no volume attached before the others, and otherwise removes the newest first; deleting a pool removes all of its workers. Each is taken out of the load balancers and drained, with up to 15 minutes for your pod disruption budgets, and its volumes move to the workers that remain in their zone. A minor Kubernetes upgrade drains workers too, but waits on your budgets instead of forcing them.
Names, sizes and zones
| Name | 1 to 16 lowercase letters, digits and dashes, starting with a letter. w and cp are reserved, and so is default, except for the first pool of a new cluster. Workers are named after the cluster and the pool, such as shop-gpu-1. A deleted pool's name is free again once the pool is gone. |
| Size | One of the worker sizes your plan includes. See plans and limits. |
| Zone | Where the pool's workers run. There is one zone today, jordan-east-1 in the region jordan-east; more zones will be more choices. Workers spread over separate hosts within their zone, and the volumes they create stay in it. |
| Workers | 1 to 20 per pool. Your plan's workers per cluster count every pool together. |
What a worker keeps for itself
Every worker keeps some CPU and memory back for its operating system and for the Kubernetes agent and container runtime that run it, and starts evicting pods when its free memory falls below 100 MiB, so a busy pod cannot starve the worker itself. What is left is the worker's allocatable capacity: the most your pods can request on it. Allocatable is always less than the worker's size: a Small worker has 2 vCPU and 2 GB, and its pods can request 1.8 vCPU and about 1.5 GiB. The cluster's Nodes section shows each worker's live use against its allocatable capacity.
| Size | Kept back: CPU | Kept back: memory | Allocatable CPU | Allocatable memory |
|---|---|---|---|---|
| Free | 0.2 vCPU | 676 MiB | 1.8 vCPU | about 3.2 GiB |
| Small | 0.2 vCPU | 484 MiB | 1.8 vCPU | about 1.5 GiB |
| Medium | 0.2 vCPU | 676 MiB | 1.8 vCPU | about 3.2 GiB |
| Large | 0.25 vCPU | 868 MiB | 3.75 vCPU | about 7 GiB |
- The memory kept back includes the 100 MiB eviction threshold. The kernel takes a little more before Kubernetes counts anything, hence "about".
- The cluster's own services, such as DNS and the pod network, run on workers too and use part of what is allocatable.
- The Free worker's two vCPUs share one core's worth of CPU time.
kubectl describe node <name>shows a worker's capacity, what is allocatable and what its pods request.
Clusters created before these reservations
Clusters created before these reservations existed run without them until the platform moves them over, which needs nothing from you. When it does, it changes one worker at a time, and goes on only once the one before is ready again:
- First each control plane restarts once to serve the reservations. A cluster with one control plane does not answer API requests while it restarts, usually for 15 to 20 seconds; its workloads keep running, and controllers that hold a leader lease, as many operators do, may restart once. A highly available cluster restarts its control planes one at a time and keeps answering.
- Then the Kubernetes agent and container runtime of each worker restart with the reservations, in a few seconds. The worker stays ready, and its pods keep running: nothing is drained, evicted or restarted.
- A worker whose pods already request more than it can allocate with the reservations, or already use nearly all of that memory, keeps its current settings until they fit.
- Once a cluster has moved, node pools you add later and workers that replace a failed one join with the reservations.
Disk performance
A worker's disk and every volume plugged into it can carry the same limits as a virtual machine's disks: IOPS and MiB/s for each disk, with short bursts above them. When they apply, the Node pools card shows them under each pool's size as Disk limit, and each pool in GET /v1/kubernetes/clusters/{id}/pools carries them as diskLimits, null when there are none. If a pool's workers run on hardware with different limits, it shows the lowest. A change to the limits reaches running workers at once, with no restart.
Labels the platform sets
Every worker carries these labels, for node selectors and affinity rules:
| Label | Value |
|---|---|
node.kubernetes.io/instance-type | The worker size, such as large |
topology.kubernetes.io/region | The region, jordan-east |
topology.kubernetes.io/zone | The zone, such as jordan-east-1 |
node.sahabti.com/pool | The pool's name |
Your labels and taints
A pool can carry up to 20 labels and 10 taints of your own. They apply to every worker of the pool: the running ones, the ones added when you raise its count or that replace a failed worker, and the ones still joining while you change the pool.
- Keys follow Kubernetes label syntax: a name of up to 63 characters, optionally after a domain and a slash, such as
teamorexample.com/tier. Values have up to 63 characters and may be empty. - A taint has a key, an optional value and an effect:
NoSchedule,PreferNoScheduleorNoExecute. - Change them on the pool, not on its nodes. A change to a pool reaches every worker of it: a taint you change or remove on the pool is changed or removed on its workers. Labels and taints you set on a node yourself are left alone, unless the pool sets the same key, and so are the ones Kubernetes manages, such as
node.kubernetes.io/unschedulable.
Taints and tolerations
A taint, a toleration and a node selector each do one thing:
| Where you set it | What it does | |
|---|---|---|
| Taint | On the pool | Keeps pods off the pool's workers. |
| Toleration | In the pod | Lets the pod past a matching taint. It does not send the pod to the pool. |
| Node selector | In the pod | Sends the pod to the pool, such as node.sahabti.com/pool: gpu. |
So a pool kept for one workload needs a taint, and that workload needs both a toleration and a node selector. With a toleration alone, its pods may run on the pool or anywhere else; with a node selector alone, they stay Pending, because the taint still keeps them off.
The effect decides how firmly a taint keeps pods away:
NoSchedule: pods without a matching toleration are not scheduled on the pool's workers. Pods already running there stay until they stop or you delete them.PreferNoSchedule: the soft form. Pods without a matching toleration go to other workers when there is room for them, and may still run here when there is not.NoExecute: likeNoSchedule, and pods already running on the pool's workers without a matching toleration are evicted at once. A toleration withtolerationSecondslets a pod stay that many seconds before it is evicted.
A toleration matches a taint when it has the same key and effect and, with operator: Equal, the same value. operator: Exists matches any value of the key, and a toleration without an effect matches every effect.
Run a workload on one pool
Give a pool named gpu the label team=ml and the taint dedicated=gpu with the effect NoSchedule. Then send the workload to the pool and let it past the taint:
apiVersion: apps/v1
kind: Deployment
metadata:
name: trainer
spec:
replicas: 2
selector:
matchLabels:
app: trainer
template:
metadata:
labels:
app: trainer
spec:
nodeSelector:
node.sahabti.com/pool: gpu
tolerations:
- key: dedicated
operator: Equal
value: gpu
effect: NoSchedule
containers:
- name: trainer
image: nginx:1.27-alpine
kubectl apply -f trainer.yaml
kubectl get pods -l app=trainer -o wide
Both pods run on the pool's workers, named like shop-gpu-1, and pods without the toleration stay off them. The node selector could just as well use your own label, team: ml.
To see what a pool's workers carry, and why a pod waits:
kubectl get nodes -l node.sahabti.com/pool=gpu -o custom-columns=NAME:.metadata.name,TAINTS:.spec.taints
kubectl describe pod <pod-name>
A pod a taint keeps off stays Pending, and kubectl describe pod shows untolerated taint in its events: give it the matching toleration, or check its node selector.
The cluster's own services
The services that run on every worker (pod networking and network policy, the Service proxy and the link to the control plane) tolerate every taint, so they keep running on tainted pools. DNS, the metrics API and the managed gateway do not tolerate your taints: they run on pools without a NoSchedule or NoExecute taint, which is why a cluster keeps at least one such pool. Give those pools at least two workers between them, so DNS runs two copies on separate workers; with one, both copies run on that worker and stop with it. See Cluster services and taints.
Rules
- Plan limits: the workers of every pool count against your plan's workers per cluster, and a pool can only use your plan's worker sizes. Lowering a count and deleting a pool are always allowed.
- Quota: until usage billing is on for the workspace, every worker of a paid size takes its vCPU, memory and disk from its quota, like an instance, so a new pool or more workers need room in it; the dialog shows what they use. Once it is on, they are billed by the hour and never count. The Free worker and the control plane never count.
- At least one pool: a cluster keeps at least one node pool. Add another before you delete the last one.
- A pool for the cluster's own services: DNS and the cluster's other services do not tolerate your taints, so at least one pool must have no
NoScheduleorNoExecutetaint. A change that would leave every pool with one is refused, and one that leaves those pools a single worker between them is allowed with a warning: see Cluster services and taints. - Reserved keys: keys in the
kubernetes.io,k8s.ioandsahabti.comdomains, and their subdomains, belong to Kubernetes and the platform, so a pool's labels and taints cannot use them.
Cluster services and taints
DNS, the metrics API and the managed gateway run only on workers without a NoSchedule or NoExecute taint (see The cluster's own services), so how many such workers the cluster has decides what they survive.
Keep at least two workers without such taints, in one pool or across several, or use PreferNoSchedule for the pools you keep for one workload: a PreferNoSchedule taint steers other pods away when there is room elsewhere, and still lets the cluster's own services run there.
What happens with fewer:
Workers without a NoSchedule or NoExecute taint | What the cluster does |
|---|---|
| Two or more | DNS runs two copies on separate workers. When one worker fails, the other keeps answering. |
| One, among several workers | DNS still runs two copies, both on that worker, so a crash of one copy is covered but the loss of the worker is not: DNS, the metrics API and the managed gateway stop until it is back. The cluster's Overview shows The cluster's own services run on one worker and the workspace's owners and admins get an email. |
| None | Refused when you change pools. A taint set with kubectl that covers every worker stops DNS, and services can no longer be found by name; the Overview shows No worker can run the cluster's own services. |
The console warns before you save a pool change, add or delete a pool, or create a cluster that would leave a single worker for these services, and the Nodes page keeps the warning while it lasts. As soon as a second worker can run them, the platform moves one DNS copy to it, so the two copies run on separate workers again without anything to restart. Through the API, systemWorkers on GET /v1/kubernetes/clusters/{id} counts these workers, and GET /v1/kubernetes/clusters/{id}/notices lists the system_workers_low notice.