Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

179
Vistas
Do PodDisruptionBudgets take priority over HorizontalPodAutoscalers?

If you have a PDB that specifies a higher minAvailable than the minReplicas of a HPA, will the number of pods ever reach the lower minReplicas?

Example configs:

PDB

apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
  name: frontend-pdb
spec:
  minAvailable: 3 # HERE
  selector:
    matchLabels:
      app: frontend

HPA

apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: frontend-hpa
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: frontend-deployment
  minReplicas: 2 # AND HERE
  maxReplicas: 20
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 65

I image putting the PDB to a % rather than an absolute would solve this potetial conflict, but I am curious how the two play with each other.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

In your case both objects will be created and value minAvailable: 3 defined in PodDisruptionBudget will have higher priority than minReplicas: 2 defined in Deployment. Conditions defined in PDB are more important. In such case conditions for PDB are met but if autoscaler will try to decrease number of replicas it will be blocked because condition in PDB of minAvailable value will be not met. You have wrote that you have noticed that when you update a deployment, and you have the PDB minAvailable less than the minReplicas in HPA, the amount of available pods never goes below the HPA. And it is normal because autoscaler take under consideration PDB and if

minReplicas > minAvailable

so the conditions for PDB are met (minAvailable is critical line so higher value is also proper) so HPA can then take under consideration his conditions and will hit at best minReplicas.

Overall idea of defining Pod Disruption Budget is to make sure minimum replicas are always working.

While node operation, the drain will halt and wait that all PDBs condition are respected when performing pod eviction. If pods that was evicted would cause a PDB to be invalid would wait till the condition would be valid.

NOTE:

A PDB for a deployment with a single replica will most likely cause the node operation to never succeed.

Read more: downscaling-kubernetes, hpa-pdb-kubernetes.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda