---
title: The Kubernetes Autoscaler Charm
description: Managing a Kubernetes cluster is a complex endeavor. As demands on a
  cluster grow, increasing the number of deployed pods can help ease the load on the
  system. But what do you do when you run out of nodes to host those pods, or when
  the load decreases and some nodes are no longer needed? Manually adding or removing
  nodes is possible, but wouldn’t it be better if there was a way to automate that
  task? Fortunately, that’s exactly what the Kubernetes Autoscaler charm is for!
url: https://canonical-com-2934.demos.haus/blog/the-kubernetes-autoscaler-charm?format=md
---

1. [Blog](https://canonical-com-2934.demos.haus/blog)
2. Article

---

[Stone Preston](https://canonical-com-2934.demos.haus/blog/author/stonepreston "More about Stone Preston")

7 June 2022

# The Kubernetes Autoscaler Charm

[canonical kubernetes](https://canonical-com-2934.demos.haus/blog/tag/canonical-kubernetes)
[Charmed Kubernetes](https://canonical-com-2934.demos.haus/blog/tag/charmed-kubernetes)
[kubernetes](https://canonical-com-2934.demos.haus/blog/tag/kubernetes)

---

Share the article

Managing a Kubernetes cluster is a complex endeavor. As demands on a cluster grow, increasing the number of deployed pods can help ease the load on the system. But what do you do when you run out of nodes to host those pods, or when the load decreases and some nodes are no longer needed? Manually adding or removing nodes is possible, but wouldn’t it be better if there was a way to automate that task? Fortunately, that’s exactly what the Kubernetes Autoscaler charm is for!

## Types of Autoscalers

Before diving into the details of the Kubernetes Autoscaler charm, it’s important to understand the different types of autoscaling that are possible in Kubernetes.

There are three types of autoscaling available: horizontal pod autoscaling, vertical pod autoscaling, and cluster autoscaling.

### Horizontal Pod Autoscaling

Horizontal pod autoscaling involves responding to changes in cluster load by adding and removing pods. As workload demand increases, more pods are added. If the demand slows down, pods are removed.

Horizontal Pod Autoscaling

### Vertical Pod Autoscaling

Vertical pod autoscaling adjusts pod memory and CPU limits. When workload demand increases, the resource limits for a pod are increased. Similarly when the demand decreases, the resource limits are lowered.

Vertical Pod Autoscaling

### Cluster Autoscaling

Cluster autoscaling scales the cluster itself, adding nodes to accommodate unscheduled pods, and removing nodes when they become underutilized.

Cluster Autoscaling

The Kubernetes Autoscaler charm is a **cluster autoscaler**.

## Why would you want to use a cluster autoscaler?

Using a cluster autoscaler allows you to automatically resize your cluster, increasing the number of nodes to meet pod scheduling requirements. On the other hand, the autoscaler can also remove nodes that are not being used. This can save you money, as you can stop using machines that are no longer necessary. A cluster autoscaler can help you maintain a cluster that is just the right size for your current needs.

## How does the Kubernetes Autoscaler Charm work?

The Kubernetes Autoscaler charm is designed to run on top of a Charmed Kubernetes cluster. Once deployed, the autoscaler interacts directly with Juju in order to respond to changing cluster demands. Remember, cluster autoscaling involves adding and removing nodes, so when pods are unable to be scheduled, or if a node is not being fully utilized, the autoscaler charm uses Juju constructs to resolve these issues.

### Scale up

When the scheduler is unable to find a node to place a pod on, it will mark that pod as unschedulable. The autoscaler watches for unschedulable pods, and responds by sending a request to Juju asking that a unit be added to the Kubernetes worker application. Juju then adds a unit resulting in a new node being added to the cluster. The pod can then be scheduled on the new node. Problem solved!

Scale Up Process

### Scale down

The autoscaler periodically checks to see if any nodes are being underutilized. If it finds an underutilized node, it will attempt to move all the pods currently running on that node to other nodes. Once the node is empty, the autoscaler sends a remove-unit request to Juju to remove the now-empty node. Juju removes the unit from the worker application, which results in the node being removed from the cluster.

Scale Down Process

## Wrapping up

Autoscaling is a complicated topic, but now you know a little more about the different types of solutions available. You also learned how the Kubernetes Autoscaler charm can solve some of the common problems associated with responding to changing cluster demands, and gained insight into how the autoscaler charm works internally.

## Demo

## What next

* Read the [docs](https://ubuntu.com/kubernetes/docs/autoscaler) to learn how to deploy and configure the Kubernetes Autoscaler charm
* Deploy the autoscaler charm from [Charmhub](https://charmhub.io/kubernetes-autoscaler)

## Sign up for our newsletter

Get the latest Canonical news and updates in your inbox.

Work email:

\*I agree to receive information about Canonical's
products and services.

By submitting this form, I confirm that I have read and agree to [Canonical's Privacy Policy](https://canonical-com-2934.demos.haus/legal/dataprivacy).

Sign up

## Share on

---

## Related posts

[### Canonical releases FIPS-enabled Kubernetes](https://canonical-com-2934.demos.haus/blog/canonical-releases-fips-enabled-kubernetes)

Today at KubeCon North America, Canonical, the publisher of Ubuntu, released support to enable FIPS mode in its Kubernetes distribution, providing everything needed to create...

[Canonical](https://canonical-com-2934.demos.haus/blog/author/canonical)

11 November 2025

[### The next era of telco clouds: get open infrastructure choice with Sylva and Canonical Kubernetes](https://canonical-com-2934.demos.haus/blog/the-next-era-of-telco-clouds-get-open-infrastructure-choice-with-sylva-and-canonical-kubernetes)

Achieving vendor neutrality in telco clouds requires an infrastructure layer that respects open standards, without wrapping them in rigid platform layers. By combining upstream...

[estelacarmona](https://canonical-com-2934.demos.haus/blog/author/estelacarmona)

11 June 2026

[### How to set up a micro lab: four principles for a reliable homelab](https://canonical-com-2934.demos.haus/blog/how-to-set-up-a-reliable-homelab)

After over a decade of running a homelab, I have learned a few difficult lessons. Although it begins as a “lab,” you inevitably end up with something you want to keep. If a...

[Jake Nabasny](https://canonical-com-2934.demos.haus/blog/author/slapcat)

17 March 2026

[### Deploy your Spring Boot application to production](https://canonical-com-2934.demos.haus/blog/deploy-spring-application-to-production)

In this article we walk through the steps required to deploy a Spring Boot application to production using Juju and Kubernetes. The goal is to showcase the integration of the...

[Javier de la Puente](https://canonical-com-2934.demos.haus/blog/author/javierdelapuente)

13 January 2026
