<p>hy folks </p>

<p>i try to set up in pourcent the PCU target on HPA. By default it's <strong>80%</strong> and i would want to set it to <strong>30%</strong></p>

<p>in my <strong>hpa-pod.yaml</strong> i add the value <strong>targetCPUUtilizationPercentage</strong> but it doesn't overwrite the default value  i dont understand . did i mistake a prameters ? </p>

<pre><code>NAME                                          REFERENCE                TARGETS   MINPODS   MAXPODS   REPLICAS   AGE
horizontalpodautoscaler.autoscaling/hpa-pod   Deployment/cas-dp-ap   0%/80%    1         4         1          5m
</code></pre>

<p>-</p>

<pre><code>metrics:
- type: Resource
  resources:
    name: cpu
    targetCPUUtilizationPercentage: 30
</code></pre>

morla
<p>the solution of my problem was to remove all the block from metrics to name </p>

<pre><code>apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
  labels:
    chart: value-given-by-helm
    release: cas-dp-ap
  name: hpa-pod
  namespace: xxx
spec:
  maxReplicas: 4
  minReplicas: 1
  scaleTargetRef:
    apiVersion: apps/v1beta1
    kind: Deployment
    name: cas-dp-ap
  targetCPUUtilizationPercentage: 30
</code></pre>
