Deploy Cluster Autoscaler¶
This section will guide you through deploying the Cluster Autoscaler on your EKS cluster.
Fast Forward
If you already have deployed the Cluster Autoscaler, expand this box to fast-forward.
- Proceed to the Verify section.
See also
- Official EKS docs for Cluster Autoscaler.
Warning
Only use Cluster Autoscaler images provided by Arrikto for these manifests. Generic Cluster Autoscaler images are not compatible with these manifests.
Choose one of the following options to deploy the Cluster Autoscaler:
- Option 1: Deploy Cluster Autoscaler Automatically (preferred).
- Option 2: Deploy Cluster Autoscaler Manually.
Overview
What You’ll Need¶
- A configured management environment.
- Your clone of the Arrikto GitOps repository.
- An existing EKS cluster.
- An existing IAM role for the Cluster Autoscaler.
Option 1: Deploy Cluster Autoscaler Automatically (preferred)¶
Deploy the Cluster Autoscaler by following the on-screen instructions on the
rok-deploy
user interface.
If rok-deploy
is not already running, start it with:
Proceed to the Summary section.
Option 2: Deploy Cluster Autoscaler Manually¶
If you want to deploy the Cluster Autoscaler manually, follow the instructions below.
Procedure¶
Go to your GitOps repository, inside your
rok-tools
management environment:root@rok-tools:~# cd ~/ops/deploymentsRestore the required context from previous sections:
root@rok-tools:~/ops/deployments# source <(cat deploy/env.{envvars-aws,\ > eks-cluster,autoscaler-eks-iam})root@rok-tools:~/ops/deployments# export EKS_CLUSTER AWS_ACCOUNT_ID AUTOSCALER_EKS_IAM_ROLERender the Cluster Autoscaler service account patch template with the variables you have specified:
root@rok-tools:~/ops/deployments# j2 rok/cluster-autoscaler/overlays/deploy/patches/sa.yaml.j2 \ > -o rok/cluster-autoscaler/overlays/deploy/patches/sa.yamlRender the
params.env
template with the values you have specified:root@rok-tools:~/ops/deployments# j2 rok/cluster-autoscaler/overlays/deploy/params.env.j2 \ > -o rok/cluster-autoscaler/overlays/deploy/params.envAdd the Cluster Autoscaler overlay that corresponds to your Kubernetes version. Choose one of the following options, based on your Kubernetes version:
Edit
rok/cluster-autoscaler/overlays/deploy/kustomization.yaml
and usek8s-1.21
instead ofarrikto
as the base overlay:resources: #- ../arrikto #- ../k8s-1.19 #- ../k8s-1.20 - ../k8s-1.21
Edit
rok/cluster-autoscaler/overlays/deploy/kustomization.yaml
and usek8s-1.20
instead ofarrikto
as the base overlay:resources: #- ../arrikto #- ../k8s-1.19 - ../k8s-1.20 #- ../k8s-1.21
Edit
rok/cluster-autoscaler/overlays/deploy/kustomization.yaml
and usek8s-1.19
instead ofarrikto
as the base overlay:resources: #- ../arrikto - ../k8s-1.19 #- ../k8s-1.20 #- ../k8s-1.21
Air Gapped
Patch the kustomization to use the mirrored images:
root@rok-tools:/# rok-image-patch \ > --kustomizations ~/ops/deployments/rok/cluster-autoscaler/overlays/deployfollow the on-screen instructions and provide any necessary input.
Commit your changes:
root@rok-tools:~/ops/deployments# git commit -am "Deploy Cluster Autoscaler"Mark your progress:
root@rok-tools:~/ops/deployments# export DATE=$(date -u "+%Y-%m-%dT%H.%M.%SZ")root@rok-tools:~/ops/deployments# git tag \ > -a deploy/${DATE?}/release-1.5/autoscaler-deploy \ > -m "Deploy Cluster Autoscaler"Apply the kustomization:
root@rok-tools:~/ops/deployments# rok-deploy --apply rok/cluster-autoscaler/overlays/deploy