Back to Charts

aws-cluster-autoscaler

stable/aws-cluster-autoscaler/README.md

latest5.3 KB
Original Source

aws-cluster-autoscaler

This chart has been deprecated as of version 0.3.1 and will not be updated. Please use the cluster-autoscaler chart instead.

The cluster autoscaler on AWS scales worker nodes within an AWS autoscaling group.

TL;DR:

console
$ helm install stable/aws-cluster-autoscaler -f values.yaml

Where values.yaml contains:

autoscalingGroups:
  - name: your-asg-name
    maxSize: 10
    minSize: 1

Introduction

This chart bootstraps an aws-cluster-autoscaler deployment on a Kubernetes cluster using the Helm package manager.

Prerequisites

  • Kubernetes 1.3+ with Beta APIs enabled

Installing the Chart

In order for the chart to configure the aws-cluster-autoscaler properly during the installation process, you must provide some minimal configuration which can't rely on defaults. This includes at least one element in the autoscalingGroups array and its three values: name, minSize and maxSize. These parameters cannot be passed to helm using the --set parameter at this time, so you must supply these using a values.yaml file such as:

autoscalingGroups:
  - name: your-asg-name
    maxSize: 10
    minSize: 1

To install the chart with the release name my-release:

console
$ helm install stable/aws-cluster-autoscaler --name my-release -f values.yaml

The command deploys aws-cluster-autoscaler on the Kubernetes cluster using the supplied configuration. The configuration section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Verifying Installation

The chart will succeed even if the three required parameters are not supplied. To verify the aws-cluster-autoscaler is configured properly find a pod that the deployment created and describe it. It must have a --nodes argument supplied to the ./cluster-autoscaler app under Command. For example (all other values are omitted for brevity):

Containers:
  aws-cluster-autoscaler:
    Command:
      ./cluster-autoscaler
      --cloud-provider=aws
      --nodes=1:10:your-asg-name
      --scale-down-delay=10m
      --skip-nodes-with-local-storage=false
      --skip-nodes-with-system-pods=true
      --v=4

Uninstalling the Chart

To uninstall/delete the my-release deployment:

console
$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following table lists the configurable parameters of the aws-cluster-autoscaler chart and their default values.

ParameterDescriptionDefault
autoscalingGroups[].nameautoscaling group nameNone. You must supply at least one.
autoscalingGroups[].maxSizemaximum autoscaling group sizeNone. You must supply at least one.
autoscalingGroups[].minSizeminimum autoscaling group sizeNone. You must supply at least one.
awsRegionAWS regionus-east-1
image.repositoryImagek8s.gcr.io/cluster-autoscaler
image.tagImage tagv0.5.4
image.pullPolicyImage pull policyIfNotPresent
extraArgsadditional container arguments{}
nodeSelectornode labels for pod assignment{}
podAnnotationsannotations to add to each pod{}
replicaCountdesired number of pods1
resourcespod resource requests & limits{}
scaleDownDelaytime to wait between scaling operations10m (10 minutes)
service.annotationsannotations to add to servicenone
service.clusterIPIP address to assign to service""
service.externalIPsservice external IP addresses[]
service.loadBalancerIPIP address to assign to load balancer (if supported)""
service.loadBalancerSourceRangeslist of IP CIDRs allowed access to load balancer (if supported)[]
service.servicePortservice port to expose8085
service.typetype of service to createClusterIP
skipNodes.withLocalStoragedon't terminate nodes running pods that use local storagefalse
skipNodes.withSystemPodsdon't terminate nodes running pods in the kube-system namespacetrue

Specify each parameter you'd like to override using a YAML file as described above in the [installation](#Installing the Chart) section.

You can also specify any non-array parameter using the --set key=value[,key=value] argument to helm install. For example,

console
$ helm install stable/aws-cluster-autoscaler --name my-release \
    --set awsRegion=us-west-1

IAM Permissions

The worker running the cluster autoscaler will need access to certain resources and actions:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "autoscaling:DescribeAutoScalingGroups",
                "autoscaling:DescribeAutoScalingInstances",
                "autoscaling:SetDesiredCapacity",
                "autoscaling:TerminateInstanceInAutoScalingGroup"
            ],
            "Resource": "*"
        }
    ]
}

Unfortunately AWS does not support ARNs for autoscaling groups yet so you must use "*" as the resource. More information here.