<p>In Kubernetes docs <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#algorithm-details" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#algorithm-details</a> it is said that:</p>
<p>For example, if the current metric value is 200m, and the desired value is 100m, the number of replicas will be doubled, since 200.0 / 100.0 == 2.0 If the current value is instead 50m, you'll halve the number of replicas, since 50.0 / 100.0 == 0.5. The control plane skips any scaling action if the ratio is sufficiently close to 1.0 <strong>(within a globally-configurable tolerance, 0.1 by default).</strong></p>
<p>But there is no information how to change this tolerance in yaml hpa config. Below is my hpa config</p>
<pre><code>apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: my-app-hpa
  namespace: my-app
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: my-app
  minReplicas: 1
  maxReplicas: 6
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 70
</code></pre>
<p>How can I modify value of tolerance?</p>

Nimander
<p>The tolerance value for the horizontal pod autoscaler (HPA) in Kubernetes is a global configuration setting and it's not set on the individual HPA object. It is set on the controller manager that runs on the Kubernetes control plane. You can change the tolerance value by modifying the configuration file of the controller manager and then restarting the controller manager.</p>
