Deploy Cluster Autoscaler

This section will guide you through deploying the Cluster Autoscaler on your EKS cluster.

See also

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)

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:

root@rok-tools:~# rok-deploy --run-from autoscaler-eks-deploy
../../../_images/autoscaler-eks-deploy.png

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

  1. Go to your GitOps repository, inside your rok-tools management environment:

    root@rok-tools:~# cd ~/ops/deployments
  2. Restore 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_ROLE
  3. Render 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.yaml
  4. Render 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.env
  5. Add the Cluster Autoscaler overlay that corresponds to your Kubernetes version. Choose one of the following options, based on your Kubernetes version:

    1. Edit rok/cluster-autoscaler/overlays/deploy/kustomization.yaml and use k8s-1.21 instead of arrikto as the base overlay:

      resources: #- ../arrikto #- ../k8s-1.19 #- ../k8s-1.20 - ../k8s-1.21
    1. Edit rok/cluster-autoscaler/overlays/deploy/kustomization.yaml and use k8s-1.20 instead of arrikto as the base overlay:

      resources: #- ../arrikto #- ../k8s-1.19 - ../k8s-1.20 #- ../k8s-1.21
    1. Edit rok/cluster-autoscaler/overlays/deploy/kustomization.yaml and use k8s-1.19 instead of arrikto as the base overlay:

      resources: #- ../arrikto - ../k8s-1.19 #- ../k8s-1.20 #- ../k8s-1.21
  6. Commit your changes:

    root@rok-tools:~/ops/deployments# git commit -am "Deploy Cluster Autoscaler"
  7. 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"
  8. Apply the kustomization:

    root@rok-tools:~/ops/deployments# rok-deploy --apply rok/cluster-autoscaler/overlays/deploy

Verify

  1. Verify that the Cluster Autoscaler is up-and-running. Verify that field READY is 1/1:

    root@rok-tools:~# kubectl get -n kube-system deploy/cluster-autoscaler NAME READY UP-TO-DATE AVAILABLE AGE cluster-autoscaler 1/1 1 1 1m

Summary

You have successfully deployed the Cluster Autoscaler on your EKS cluster.

What’s Next

The next step is to deploy the NVIDIA device plugin.