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.