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. Configure the eks overlay.

    1. Render the service account patch template:

      root@rok-tools:~/ops/deployments# j2 \ > rok/cluster-autoscaler/overlays/eks/patches/sa.yaml.j2 \ > -o rok/cluster-autoscaler/overlays/eks/patches/sa.yaml
    2. Render the template with the deployment parameters:

      root@rok-tools:~/ops/deployments# j2 \ > rok/cluster-autoscaler/overlays/eks/params.env.j2 \ > -o rok/cluster-autoscaler/overlays/eks/params.env
  4. Configure the deploy overlay.

    1. Set the platform to use:

      root@rok-tools:~/ops/deployments# export PLATFORM=eks
    2. Specify the Kubernetes version to use. Choose one of the following options, based on your Kubernetes version:

      1. Set the Kubernetes cluster version to 1.24:

        root@rok-tools:~/ops/deployments# export CLUSTER_VERSION=1.24
      1. Set the Kubernetes cluster version to 1.23:

        root@rok-tools:~/ops/deployments# export CLUSTER_VERSION=1.23
      1. Set the Kubernetes cluster version to 1.22:

        root@rok-tools:~/ops/deployments# export CLUSTER_VERSION=1.22
    3. Configure the deploy overlay to use the desired platform overlay and components:

      root@rok-tools:~/ops/deployments# j2 \ > rok/cluster-autoscaler/overlays/deploy/kustomization.yaml.j2 \ > -o rok/cluster-autoscaler/overlays/deploy/kustomization.yaml
  5. Save your state:

    root@rok-tools:~/ops/deployments# rok-j2 deploy/env.autoscaler-eks-deploy.j2 \ > -o deploy/env.autoscaler-eks-deploy
  6. Commit your changes:

    root@rok-tools:~/ops/deployments# git commit -am "Deploy Cluster Autoscaler"
  7. Apply the kustomization:

    root@rok-tools:~/ops/deployments# rok-deploy --apply rok/cluster-autoscaler/overlays/deploy
  8. 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?}/develop/autoscaler-eks-deploy \ > -m "Deploy Cluster Autoscaler"

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.