Deploy Cluster Autoscaler¶
This section will guide you through deploying the Cluster Autoscaler on your AKS 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.
Overview
What You’ll Need¶
- A configured management environment.
- Your clone of the Arrikto GitOps repository.
- An existing AKS cluster.
- An existing Service Principal with Contributor access on the node resource group.
Procedure¶
Go to your GitOps repository, inside your
rok-tools
management environment:root@rok-tools:~# cd ~/ops/deploymentsConfigure the
aks
overlay.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.envSet the VM Type parameter:
root@rok-tools:~/ops/deployments# export VM_TYPE=vmssRender 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
Configure the
deploy
overlay.Set the platform to use:
root@rok-tools:~/ops/deployments# export PLATFORM=aksSpecify the Kubernetes version to use. Choose one of the following options, based on your Kubernetes version:
Set the Kubernetes cluster version to
1.24
:root@rok-tools:~/ops/deployments# export CLUSTER_VERSION=1.24
Set the Kubernetes cluster version to
1.23
:root@rok-tools:~/ops/deployments# export CLUSTER_VERSION=1.23
Set the Kubernetes cluster version to
1.22
:root@rok-tools:~/ops/deployments# export CLUSTER_VERSION=1.22
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
Commit your changes:
root@rok-tools:~/ops/deployments# git commit -am "Deploy Cluster Autoscaler"Apply the kustomization:
root@rok-tools:~/ops/deployments# rok-deploy --apply rok/cluster-autoscaler/overlays/deploy