According to the VMware Tanzu Kubernetes documentation Grid we cannot modify the Autoscaler configuration parameters. after you deploy the cluster.
Depending on the parameter that you are trying to modify there are two Kubernetes object where this configuration can be changed. Please make sure that the kubectl context is changed to management cluster before running the commands below
kubectl get machinedeployments
NAME PHASE REPLICAS READY UPDATED UNAVAILABLE
cluster-one-md-0 Running 1 1 1
tkg-wld-md-0 Running 1 1 1
annotations:
cluster.k8s.io/cluster-api-autoscaler-node-group-max-size: "10"
cluster.k8s.io/cluster-api-autoscaler-node-group-min-size: "1"
To update the following values, you will need to modify them under the cluster autoscaler deployment in the management cluster
AUTOSCALER_MAX_NODES_TOTAL
AUTOSCALER_SCALE_DOWN_DELAY_AFTER_ADD
AUTOSCALER_SCALE_DOWN_DELAY_AFTER_DELETE AUTOSCALER_SCALE_DOWN_DELAY_AFTER_FAILURE
AUTOSCALER_SCALE_DOWN_UNNEEDED_TIME
AUTOSCALER_MAX_NODE_PROVISION_TIME
kubectl get deployment
NAME READY UP-TO-DATE AVAILABLE AGE
cluster-one-cluster-autoscaler 1/1 1 1 16h
kubectl edit deployment cluster-one-cluster-autoscaler
spec:
containers:
- args:
- --cloud-provider=clusterapi
- --v=4
- --clusterapi-cloud-config-authoritative
- --kubeconfig=/mnt/cluster-one-kubeconfig/value
- --node-group-auto-discovery=clusterapi:clusterName=cluster-one
- --scale-down-delay-after-add=10m
- --scale-down-delay-after-delete=10s
- --scale-down-delay-after-failure=3m
- --scale-down-unneeded-time=10m
- --max-node-provision-time=15m
- --max-nodes-total=0