Scaling worker nodes with Karpenter
Karpenter (https://karpenter.sh) is an open source autoscaling solution built for Kubernetes and is designed to build and remove capacity to cope with fluctuating demand without the need for node or ASGs. The following diagram illustrates the general flow:
Figure 18.5 – High-level Karpenter flow
In the preceding diagram, we can see the following:
- Karpenter is actively looking for pods in the
Pending
state that cannot be scheduled due to insufficient resources. - The Karpenter controller will review resource requests, node selectors, affinities, and tolerations for these pending pods, and provision nodes that meet the requirements of the pods.
- Once the node has registered with the cluster, the scheduler will schedule the pod on that node.
- Once the pod has been deployed and assuming there are no issues with the pod itself, the state is changed to Running.
Now that we’ve looked at...