Questions tagged [kubernetes-hpa]

Kubernetes Horizontal Pod Autoscaler (also HPA) automatically scales the number of pods in a replication controller, deployment or replica set based on observed resource metrics or custom metrics.

36 questions
1
vote
1 answer

How does multiple replicas/pods scale Kubernetes?

From what I understand, using multiple replicas as well as auto-scaling is supposed to help in the case that lots of people visit your website and make calls to services provided by your Kubernetes cluster. How do the replicas help with…
abrarisme
  • 495
  • 1
  • 6
  • 14
0
votes
0 answers

Kubernetes custom HPA on top of cloud watch collected metrics, how to interpret the output?

I am running a scaling policy that depends on the average number of items in the SQS queue. Here is the sample output of kubectl get hpa -w "aws_sqs_approximate_number_of_messages_visible_average" on Service/generation-service (target average…
Ihor M.
  • 2,728
  • 3
  • 44
  • 70
0
votes
1 answer

Horizontal Pod Autoscaling in Kubernetes Google Cloud with custom metric

I have following yaml-configuration for my horizontal pod autoscaler in GCP. //... metrics: - type: Pods pods: metric: name: "my-custom-metric" target: type: AverageValue averageValue:…
0
votes
1 answer

Scale up condition keeps idle pods up

Having a HPA configuration of 50% average CPU kubectl autoscale deployment php-apache --cpu-percent=50 --min=1 --max=10 I found the problem that I have only one pod receiving traffic so the CPU is higher than 50% of request cpu. Then start auto…
paul
  • 12,873
  • 23
  • 91
  • 153
0
votes
2 answers

Kubernetes - Horizontal Pod Scaler error, target "unknown". Message "no recommendation"

I have a working 1.23.9 kubernetes cluster hosted on Google Kubernetes Engine with multi-cluster services enabled, one cluster hosted in us and another in eu. I have multiple deployment apps and hpa configured for each through YAML. Out of 7…
0
votes
1 answer

How to suppress 'get hpa' error message when hpa not found?

I am incorporating HPA creation based on certain toggle-able environment variables passed to our Jenkins bash deploy script. There are 3 conditions: Correct HPA variables are found run 'get hpa' in project and delete it, before re-adding incase…
0
votes
1 answer

Kubernetes customized controller for collaborated auto scaling

I am very new to Kubernetes CRD and customized controller. I am trying to implement a customized controller that horizontally scale my CRD instances in a collaborated way. For example, suppose I have 5 CPUs and two Jobs. Each of them has 2 replicas…
0
votes
1 answer

Kubernetes hpa with external metric. My external metric is not returning correct value

I want to scale my worker pods using HPA based on the total number of outstanding messages across all AWS SQS queues. Since there is no such metric available, I created a custom metric using lambda function. I am using…
0
votes
0 answers

How to configure Horizontal Pod Autoscaler to fit pods to a node?

I have a diverse set of artifacts that require processing and a non-homogenous computing environment, e.g. - some inputs are large and take a long time and lots of memory, others are small so take a short time and little memory, and the nodes do not…
Adam Miller
  • 1,756
  • 1
  • 25
  • 44
0
votes
0 answers

GKE autoscaler overwrites my HorizontalPodAutoscaler in infinite loop

I own a GKE Cluster on GCP, I have 1 node pool with 1 node (4 CPU/16Gb RAM). Today I tried to scale one of my application to 10 replicas (We want to run lots of concurrent requests on it). I first edited my horizontalPodAutoscaler.yaml and changed…
0
votes
0 answers

GKE killing pods when there is more than 5 of them

I have a k8s cluster deployed on GKE, there is one "main" nodepool containing 1 node, for all the deployments and one nodepool containing 1 node for kube-ip. On the main nodepool, I would like to deploy 10 replicas of one of my application (flask…
0
votes
1 answer

Kubernetes Spare/Cold Replica/Pod

I am looking for how to have a spare/cold replica/pod in my Kubernetes configuration. I assume it would go in my Kuberentes deployment or HPA configuration. Any idea how I would make it so I have 2 spare/cold instances of my app always ready, but…
Brian
  • 556
  • 6
  • 26
0
votes
0 answers

Kubernetes HPA: failed to get memory utilization: unable to get metrics for resource memory: no metrics returned from resource metrics API

I deployed the metric server into my EKS kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.3.7/components.yaml but started getting this error when I ran kubectl describe hpa hpa-frontend Warning …
Vikas Rathore
  • 8,242
  • 8
  • 35
  • 54
0
votes
1 answer

Prometheus adapter return empty custom metrics

Having configured metric rule in the prometheus-adapter, I can see resources as follows. kubectl get --raw="/apis/custom.metrics.k8s.io/v1beta1" | jq . { "kind": "APIResourceList", "apiVersion": "v1", "groupVersion":…
0
votes
0 answers

kubernetes HPA deleted automatically

I wanted to setup HPA for a deployment on my kubernetes cluster (1.14.0 on bare metal) so I followed the instructions to setup metrics-server here: https://github.com/kubernetes-sigs/metrics-server. After deploying metrics-server, I am able issue…
rlzh
  • 1
  • 1