kops/addons/cluster-autoscaler
k8s-ci-robot 4b8db1eee0
Merge pull request #4137 from thockin-tmp/gcr-vanity
Convert registry to k8s.gcr.io
2018-02-20 08:54:39 -08:00
..
README.md Convert registry to k8s.gcr.io 2018-02-14 10:08:41 -08:00
addon.yml Reduce the Delta between this and the Autoscaler AWS documentation 2018-02-08 06:49:24 -05:00
v1.4.0.yaml cluster-autoscaler should use dnsPolicy Default 2017-09-16 19:44:45 -04:00
v1.6.0.yaml Add permissions to cluster autoscaler to get statefulsets 2017-10-13 18:17:46 +02:00
v1.8.0.yaml add storageclasses permissions for cluster-autoscaler:v1.1.0 2018-02-18 23:22:23 +02:00

README.md

Cluster Autoscaler Addon

We strongly recommend using Cluster Autoscaler with the kubernetes version for which it was meant. Refer to the Cluster Autoscaler documentation compatibility matrix

Note that you likely want to change AWS_REGION and GROUP_NAME, and probably MIN_NODES and MAX_NODES. Here is an example of how you may wish to do so:

CLOUD_PROVIDER=aws
IMAGE=k8s.gcr.io/cluster-autoscaler:v1.1.0
MIN_NODES=1
MAX_NODES=5
AWS_REGION=us-east-1
GROUP_NAME="nodes.k8s.example.com"
SSL_CERT_PATH="/etc/ssl/certs/ca-certificates.crt" # (/etc/ssl/certs for gce)

addon=cluster-autoscaler.yml
wget -O ${addon} https://raw.githubusercontent.com/kubernetes/kops/master/addons/cluster-autoscaler/v1.8.0.yaml

sed -i -e "s@{{CLOUD_PROVIDER}}@${CLOUD_PROVIDER}@g" "${addon}"
sed -i -e "s@{{IMAGE}}@${IMAGE}@g" "${addon}"
sed -i -e "s@{{MIN_NODES}}@${MIN_NODES}@g" "${addon}"
sed -i -e "s@{{MAX_NODES}}@${MAX_NODES}@g" "${addon}"
sed -i -e "s@{{GROUP_NAME}}@${GROUP_NAME}@g" "${addon}"
sed -i -e "s@{{AWS_REGION}}@${AWS_REGION}@g" "${addon}"
sed -i -e "s@{{SSL_CERT_PATH}}@${SSL_CERT_PATH}@g" "${addon}"

kubectl apply -f ${addon}