Before upgrading a TKG cluster, the autoscaler must be paused. After you upgrade the TKr version of the cluster, you must update the autoscaler package version to match the TKr minor version.
Requirements
This task assumes you have installed the cluster autoscaler on a TKG cluster. See Install Cluster Autoscaler Using Tanzu CLI.
Pre Cluster Upgrade: Pause the Autoscaler
Before you upgrade a TKG cluster with the autoscaler installed, you must first pause the autoscaler package.
- Pause the cluster autoscaler package by setting the
paused
boolean value totrue
in thevalues.yaml
configuration file.arguments: ignoreDaemonsetsUtilization: true maxNodeProvisionTime: 15m maxNodesTotal: 0 metricsPort: 8085 scaleDownDelayAfterAdd: 10m scaleDownDelayAfterDelete: 10s scaleDownDelayAfterFailure: 3m scaleDownUnneededTime: 10m clusterConfig: clusterName: "tkc" clusterNamespace: "cluster" paused: true #set to true before upgrade
- Update the package using the Tanzu CLI.
tanzu package installed update cluster-autoscaler-pkgi -n tkg-system --package cluster-autoscaler.tanzu.vmware.com --values-file values.yaml
Upgrade the Cluster
Once the autoscaler is paused, proceed with updating the cluster.
- Upgrade the Kubernetes version of the TKG cluster.
Post Cluster Upgrade: Update the Autoscaler Package Version
After upgrading the cluster, update the version of the autoscaler package to match the TKr minor version and reset the paused key to false.
- Choose the corresponding autoscaler version.
The minor versions of the TKr and the autoscaler package must match. For example, if you upgraded the cluster to TKr v1.28.8, you will need to use autoscaler v1.28.0 package.
- Generate the default
values.yaml
using the Tanzu CLI command.tanzu package available get cluster-autoscaler.tanzu.vmware.com/1.28.0+vmware.1-tkg.1 -n tkg-system --default-values-file-output new-values.yaml
- Update the
new-values.yaml
file with the new package version and reset paused to false. - Use the Tanzu CLI to update the installation of the cluster autoscaler.
tanzu package installed update cluster-autoscaler-pkgi -n tkg-system --package cluster-autoscaler.tanzu.vmware.com --values-file new-values.yaml --version 1.28.1+vmware.1-tkg.1