Summary
In this chapter, we looked at the different ways to scale EKS compute nodes (EC2) to increase resilience and/or performance. We reviewed the different scaling dimensions for our clusters and then set up node group/ASG scaling using the standard K8s CA. We then discussed how CA can take some time to operate and is restricted to ASGs, and how Karpenter can be used to scale much more quickly without the need for node groups, which means you can configure lots of different instance types. We deployed Karpenter and then showed how it can be used to scale EC2-based worker nodes up and down more quickly than CA using different instance types to the existing node groups.
Once we reviewed how to scale worker nodes, we discussed how we can use HPA to scale pods across our worker nodes. We first looked at basic HPA functionality, which uses K8s Metrics Server to monitor pod CPU and memory statistics to add or remove pods from a deployment as required. We then considered that complex...