Skip to main content

Cluster Autoscaler (CA)

Before you start

Prepare your environment for this section:

~$prepare-environment autoscaling/compute/cluster-autoscaler

This will make the following changes to your lab environment:

  • Install the Kubernetes Cluster Autoscaler in the Amazon EKS cluster

You can view the Terraform that applies these changes here.

In this lab, we'll look at the Kubernetes Cluster Autoscaler, a component that automatically adjusts the size of a Kubernetes Cluster so that all pods have a place to run without unneeded nodes. The Cluster Autoscaler is a great tool to ensure that the underlying cluster infrastructure is elastic, scalable, and can meet the changing demands of workloads.

The Kubernetes Cluster Autoscaler automatically adjusts the size of a Kubernetes cluster when one of the following conditions is true:

  1. There are pods that fail to run in a cluster due to insufficient resources.
  2. There are nodes in a cluster that are underutilized for an extended period of time and their pods can be placed on other existing nodes.

Cluster Autoscaler for AWS provides integration with Auto Scaling groups.

In this lab exercise, we'll apply the Cluster Autoscaler to our EKS cluster and see how it behaves when we scale up our workloads.