Deploy Cluster Autoscaler

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

Warning

Only use Cluster Autoscaler images provided by Arrikto for these manifests. Generic Cluster Autoscaler images are not compatible with these manifests.

What You’ll Need

Procedure

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

    root@rok-tools:~# cd ~/ops/deployments
  2. Configure the aks overlay.

    1. Render the template with the deployment parameters:

      root@rok-tools:~/ops/deployments# j2 \ > rok/cluster-autoscaler/overlays/aks/params.env.j2 \ > -o rok/cluster-autoscaler/overlays/aks/params.env
    2. Set the VM Type parameter:

      root@rok-tools:~/ops/deployments# export VM_TYPE=vmss
    3. Render the template with the environment variables for the Cluster Autoscaler, that you have set in the previous guide:

      root@rok-tools:~/ops/deployments# j2 \ > rok/cluster-autoscaler/overlays/aks/secrets/credentials.env.j2 \ > -o rok/cluster-autoscaler/overlays/aks/secrets/credentials.env
  3. Configure the deploy overlay.

    1. Set the platform to use:

      root@rok-tools:~/ops/deployments# export PLATFORM=aks
    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
  4. Commit your changes:

    root@rok-tools:~/ops/deployments# git commit -am "Deploy Cluster Autoscaler"
  5. 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 AKS cluster.

What’s Next

The next step is to deploy the NVIDIA device plugin.