<commit_before>= Kubernetes Cluster Auto-scaling
:toc:
:icons:
:linkcss:
:imagesdir: ../../resources/images
This tutorial will walk you through how to setup cluster scaling using `cluster-autoscaler` to enable worker node autoscaling based on multiple metrics within Kubernetes.

== Prerequisites

This chapter uses a cluster with 3 master nodes and 5 worker nodes as described here: link:../cluster-install#multi-master-multi-node-multi-az-gossip-based-cluster[multi-master, multi-node gossip based cluster].

All configuration files for this chapter are in the `cluster-scaling` directory. Make sure you change to that directory before giving any commands in this chapter.

=== Autoscaling group size

Check the size of your worker node autoscaling group and make sure the MaxSize is greater than 2. You can do this in the AWS Console, or use the CLI command below

    aws autoscaling describe-auto-scaling-groups --auto-scaling-group-names nodes.<cluster-name><commit_msg>Update readme.adoc<commit_after>= Kubernetes Cluster Auto-scaling
:toc:
:icons:
:linkcss:
:imagesdir: ../../resources/images
This tutorial will walk you through how to setup cluster scaling using `cluster-autoscaler` to enable worker node autoscaling based on multiple metrics within Kubernetes.

== Prerequisites

In order to perform exercises in this chapter, you’ll need to deploy configurations to a Kubernetes cluster. To create an EKS-based Kubernetes cluster, use the link:../../01-path-basics/102-your-first-cluster#create-a-kubernetes-cluster-with-eks[AWS CLI] (recommended). If you wish to create a Kubernetes cluster without EKS, you can instead use link:../../01-path-basics/102-your-first-cluster#alternative-create-a-kubernetes-cluster-with-kops[kops].

All configuration files for this chapter are in the `cluster-scaling` directory. Make sure you change to that directory before giving any commands in this chapter.

=== Autoscaling group size

Check the size of your worker node autoscaling group and make sure the MaxSize is greater than 2. You can do this in the AWS Console, or use the CLI command below

    aws autoscaling describe-auto-scaling-groups --auto-scaling-group-names nodes.<cluster-name>
{'fraction_non_alphanumeric': 0.07783340919435594, 'fraction_numerical': 0.0063723258989531175, 'mean_word_length': 4.650385604113111, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5325168', 'n_tokens_mistral': 603, 'n_tokens_neox': 549, 'n_words': 262}