cancel
Showing results for 
Search instead for 
Did you mean: 
Chetan_Tiwary_
Community Manager
Community Manager
  • 218 Views

Explain Openshift resource manifest

Explain this openshift resource manifest

 

apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: hpa-resource-metrics-memory
  namespace: default
spec:
...
  minReplicas: 20
...
  behavior:
    scaleDown:
      stabilizationWindowSeconds: 300
      policies:
      - type: Pods
        value: 4
        periodSeconds: 30
      - type: Percent
        value: 10
        periodSeconds: 60
      selectPolicy: Max
    scaleUp:
      selectPolicy: Disabled
Labels (4)
Tags (1)
5 Replies
Kent-Kamau
Mission Specialist
Mission Specialist
  • 56 Views

The provided resource manifest is for a HorizontalPodAutoscaler (HPA) which automatically scales the number of pods in a deployment or replica set based on observed resource usage or other metrics.

This HorizontalPodAutoscaler is set to:

  1. Minimum Replicas: Always maintain at least 20 pods.
  2. Scale Down Behavior: After scaling down, wait for 5 minutes before considering another scale-down event.
  3. Limit scale-down actions to a maximum of 4 pods within 30 seconds or 10% of the total pods within 60 seconds, whichever is greater.
  4. The Max scaling policy ensures that the largest scale-down value will be applied.
  5. Scale Up Behavior: Scaling up is disabled for this HPA, meaning no new pods will be added even if resource usage increases.
  • 54 Views

This configuration helps manage the number of replicas in response to changing workload demands while preventing rapid scaling oscillations.
Minimum 20 replicas running, scalling down is gradually with 10% cut down every minute or 4 pods every 30 seconds, which ever is bigger.
Scaling up targeting utilization without specific policy. 

mcapileibm
Mission Specialist
Mission Specialist
  • 34 Views

HorizontalPodAutoscaler (HPA) in OpenShift manages pod scaling based on % resource usage.
ensures at least 20 pods are always running (minReplicas: 20).
Scaling down : It can remove up to 4 pods every 30 seconds or 10% of pods every 60 seconds.
Scaling up is disabled, meaning new pods won’t be added automatically.

walid-cnj
Cadet
Cadet
  • 26 Views

Is that an old manifest?   The latest stable version of the Horizontal Pod Autoscaler (HPA) API is:  apiVersion: autoscaling/v2 was introduced in Kubernetes 1.23 and became stable (GA) in Kubernetes 1.26.

Other than what others already said, I present my concerns, what is not there instead of what is there!!

Some Concerns:
1- With scaling up disabled, the system can't automatically handle increased load
   scaleUp:  selectPolicy: Disabled

2- The minimum of 20 replicas might be resource-intensive if not needed, haven't seen it in my 6+ years of K8s operations?!

3- The 5-minute stabilization window might be too long for most workloads

4- Having two scale-down policies introduces confusion as well might lead to aggressive scaling in some scenarios

Thoughts:

Update to the right/latest API version for HPA.

Doesn't want automatic scaling up (possibly handled by other mechanisms?!)
Needs careful, controlled scaling down?!
Requires high availability (minimum 20 pods)?!

  • 10 Views

Its horizontal pod autosacalling configuration file which has details given below:
setting the repicas minimum to 20 

setting the scalling behaviour for scaling down by 4 pod (10%) every 30 seconds with stability of 5 minuts.
its not gona scale up as per this configuration

0 Kudos
Join the discussion
You must log in to join this conversation.