Written by
Eric Kozlowski
on
on
Karpenter Cluster Autoscaler
If you’re running a managed Kubernetes platform, Karpenter is a nice improvement over the Cluster Autoscaler. Karpenter provides more control for granular scaling based on specific workload requirements. Configured properly, this results in optimal resource utilization and the lower cost to serve (CTS) over time that comes with it.
Two areas where Karpenter really stands out are:
- Scaling down the cluster. This is simpler and faster with Karpenter over the standard Cluster Autoscaler.
- Easy usage of Amazon EC2 Spot Instances, a further CTS reduction opportunity. Karpenter deals with Spot instance interruption natively.
Some takeaways from trialing Karpenter in production:
- Karpenter does an excellent job of bin packing and efficient node optimization. Services will likely experience that by being subject to more pod disruption than usual. Consolidation happens at regular intervals as Karepenter consolidates sparsely packed worker nodes. The most important thing here is to ensure every service you’re running has a Kubernetes Pod Disruption Budget (PDB), and that every configuration is correct.
- Monitoring and telemetry for disrupted pods and node consolidation will not be a one-to-one copy from monitoring you may have used for the Cluster Autoscaler. Expect that your alerts and monitoring will need to be retuned or in some cases completely rethought so that they work properly with Karpenter.