Questions tagged [hpa]

Horizontal Pod Autoscaler is an API resource in the Kubernetes and used to horizontally scale number of kubernetes pods based on metrics values

223 questions
2
votes
2 answers

How to make k8s cpu and memory HPA work together?

I'm using a k8s HPA template for CPU and memory like below: --- apiVersion: autoscaling/v1 kind: HorizontalPodAutoscaler metadata: name: {{.Chart.Name}}-cpu labels: app: {{.Chart.Name}} chart: {{.Chart.Name}} spec: scaleTargetRef: …
Ankit Sethi
  • 51
  • 1
  • 7
2
votes
2 answers

HPA Scaling even though Current CPU is below Target CPU

I am playing around with the Horizontal Pod Autoscaler in Kubernetes. I've set the HPA to start up new instances once the average CPU Utilization passes 35%. However this does not seem to work as expected. The HPA triggers a rescale even though the…
2
votes
1 answer

load distribution between pods in hpa

I notice the cpu utilization of pods in same hpa varies from 31m to 1483m. Is this expected and normal? See below for the cpu utilization of 8 pods which are of the same hpa. NAME CPU(cores) myapp-svc-pod1 …
Saha
  • 89
  • 1
  • 10
2
votes
1 answer

Kubernetes pod HPA not working during maintenance/upgrades Worker nodes

I have implemented HPA for all the pods based on CPU and it was working as expected. But when we did a maintenance of worker nodes, it seems tha HPA's got messed up as it failed to identify it. Do I need to disable HPA temporarily during maintenance…
dvlpr
  • 311
  • 3
  • 17
2
votes
1 answer

k8s HorizontalPodAutoscaler - set target on limit, not request

I have a deployment where cpu request is 500m and cpu limit is 1000m. I create a hpa as - metrics: - type: Resource resource: name: cpu target: type: Utilization averageUtilization: 80 This makes calculations…
Dhanuj Dharmarajan
  • 436
  • 1
  • 3
  • 10
2
votes
1 answer

How to upgrade a Deployment in Helm without modifying replicas?

When creating a Deployment and HorizontalPodAutoscaler together in a Helm chart, should the deployment’s .spec.replicas be set to null, or should it be unset, or should it be set to some value between the hpa’s minReplicas and maxReplicas? When you…
yonran
  • 18,156
  • 8
  • 72
  • 97
2
votes
2 answers

Kubernetes metrics-server doesn't provide all metrics or scale HPA

Following the example here https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#autoscaling-on-metrics-not-related-to-kubernetes-objects, I have created installed metrics-server and modified it as follows: …
2
votes
1 answer

HPA says FailedComputeMetricsReplicas

I have deployed an app and exposed it as a loadbalancer service. I added the resource field in the yaml of the deployment to request for 100m cpu. Defined a HPA to scale the app when the CPU goes above 50%. The app fails to autoscale and the cpu…
aakash sinha
  • 21
  • 1
  • 2
2
votes
0 answers

Horizontal pod autoscaler not able to get metrics in minikube deployment

This is an open issue: https://github.com/kubernetes/minikube/issues/9370 Steps to reproduce: $ minikube start — extra-config=controller-manager.horizontal-pod-autoscaler-upscale-delay=1m —…
2
votes
0 answers

Kubernetes Custom metrics not available at Service level

I have installed Prometheus server and adapter on Kubernetes cluster, to collect metrics from Kubernetes objects. Prometheus server and adapter are installed using Helm charts and they are running fine. Now deployed Spring boot app which serves…
Rajeev
  • 4,762
  • 8
  • 41
  • 63
2
votes
1 answer

Kubernetes Deployment makes great use of cpu and memory without stressing it

I have deployed an app on Kubernetes and would like to test hpa. With kubectl top nodes command, i noticed that cpu and memory are increased without stressing it. Does it make sense? Also while stressing deployment with apache bench, cpu and memory…
alex
  • 343
  • 2
  • 9
2
votes
1 answer

Kubernetes Prometheus metric for HPA (horizontal pod autoscaler) `currentCPUUtilizationPercentage`?

On a Kubernetes cluster with CoreOS Prometheus Operator scraping all standard cluster metrics, what Prometheus metric would show me the currentCPUUtilizationPercentage value for a simple HPA (horizontal pod autoscaler)? If I setup a simple hpa…
clay
  • 18,138
  • 28
  • 107
  • 192
2
votes
1 answer

Kubernetes scaling up not fast enough (for K8 1.17 or below)

Kubernetes 1.18 has a very nice ability to change auto-scaling going up through the behavior and scaleUp set. For 1.17, there's a way to control downscaling. Is there a parallel way to scale up faster? We are expecting very variable loads and our…
2
votes
1 answer

Kubernetes node CPU utilization

I'm trying(learning) to figure out the best way to utilize CPU (and RAM) on k8s nodes. My final goal is to make sure CPU utilization on each node in the cluster is above X% Till now I've read about cluster-autoscaler and HPA, but not sure if they'd…
Mahyar
  • 1,011
  • 2
  • 17
  • 37
2
votes
1 answer

Kubernetes hpa cpu utilization

I found something wrong at HPA for istio gateway. Why did 10m equal 10%? Wasn't 10m 1%? Kubernetes version is 1.18.5. # kubectl get hpa --all-namespaces NAMESPACE NAME REFERENCE TARGETS MINPODS …
honillusion
  • 145
  • 7