Capi Cluster Auto Scaler Addon

Introduction

The Platform9 managed Cluster Autoscaler for CAPI clusters ensures the resources of the Kubernetes Cluster Worker Node Groups are never exhausted. More specific information about Cluster Autoscaler for CAPI arrow-up-rightcan be found on its specific GitHub pagesarrow-up-right.

Description

The CAPI Cluster Auto-Scaler add-on continually verifies the number of needed pods that are pending allocation for particular Node Groups. If there are pods that are pending for allocation on a particular Node Group nodes, new nodes are then provisioned and added to the node group to accommodate the demand. When demand drops and fewer nodes are needed, the auto-scalar scales down the node groups. After the autoscaler add-on is enabled and the node-groups are annotated for auto-scalar, the behaviour of the auto-scalar is automatic, so users only need to define the number of replicas to be deployed.

Settings

The CAPI Cluster Auto-Scaler needs to be enabled with cluster creation or post-cluster creation from the add-ons section.

Annotating a Node Group for Auto-scalar

Following annotations need to be added to the instance of the node group custom resources.

Example:

apiVersion: cluster.x-k8s.io/v1beta1
kind: MachineDeployment
metadata:
  name: test-md-0
  namespace: default
  annotations:
    cluster.x-k8s.io/cluster-api-autoscaler-node-group-min-size: '3'
    cluster.x-k8s.io/cluster-api-autoscaler-node-group-max-size: '10'
spec:
  ...

YAML Specifications

Last updated

Was this helpful?