# Azure Autoscaler Addon

## Introduction

The Platform9 managed Azure Autoscaler addon object's primary function is to ensure the resources of the Kubernetes cluster are never exhausted. More specific information about Kubernetes Autoscaler can be found in its specific [GitHub pages](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler).

## Description

The Azure autoscaler addon continually verifies the number of needed pods that are pending allocation. If there are pods that are pending allocation and the autoscaler addon is not at its defined capacity, new nodes are then provisioned to accommodate the demand. When demand drops and fewer nodes are needed, the autoscaler removes the unused nodes. After we install the autoscaler addon, its behavior is automatic, so users only need to define the number of replicas to be deployed.

## Settings

The Azure Autoscaler settings are defined by information stored in a ConfigMap. When the addon is initially configured, user settings are provided by the client to our support team, who then implements the changes.

## YAML Specifications

The Azure credentials are stored in a secret *pf9-addons/addon-config* on the cluster.

{% tabs %}
{% tab title="YAML" %}

```yaml
apiVersion: sunpike.platform9.com/v1alpha2
kind: ClusterAddon
metadata:
  labels:
    sunpike.pf9.io/cluster: '<clsuuid>'
    type: cluster-auto-scaler-azure
  name: <clsuuid>-cluster-auto-scaler-azure
  namespace: default
spec:
  clusterID: '<clsuuid>'
  override:
    params:
    - name: minNumWorkers
      value: '<min worker count>'
    - name: maxNumWorkers
      value: '<max worker count>'
  type: cluster-auto-scaler-azure
  version: 1.13.8
  watch: true
```

{% endtab %}
{% endtabs %}

It should be noted that these addons are updated along with the `pf9-kube` version and can be referenced in the [Support Matrix](https://docs.platform9.com/kubernetes/support-matrix) article.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.platform9.com/managed-kubernetes/5.8/platform9-managed-add-ons-overview/azure-autoscaler-addon.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
