Deploying the cluster autoscaler

Deploying the cluster autoscaler to our cluster is quite simple as it just requires a simple pod to be running. All we need for this is a simple Kubernetes deployment, just as we have used in previous chapters.

In order for the cluster autoscaler to update the desired capacity of our autoscaling group, we need to give it permissions via an IAM role. If you are using kube2iam, as we discussed in Chapter 7, A Production-Ready Cluster, we will be able to specify this role for the cluster autoscaler pod via an appropriate annotation:

cluster_autoscaler.tfdata "aws_iam_policy_document" "eks_node_assume_role_policy" { statement { actions = ["sts:AssumeRole"] principals { type = "AWS" identifiers = ["${aws_iam_role.node.arn}"] ...

Get Kubernetes on AWS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.