Kubernetes Horizontal Pod Autoscaler Manifest Version 2 beta 2: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 38: Line 38:
=====type=====
=====type=====


AverageValue, Utilization
AverageValue/averageValue, Utilization/averageUtilization

Revision as of 18:50, 13 October 2020

External

Internal

Overview

v2 beta2 Horizontal Pod Autoscalers support autoscaling solution based on custom and external metrics. See:

Custom Metrics-based Scaling

Example

apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: example
spec:
  minReplicas: 1
  maxReplicas: 5
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: httpd
  metrics:
    - type: Resource
      resource:
        name: cpu
        target:
          type: Utilization
          averageUtilization: 50

.spec Elements

minReplicas

maxReplicas

scaleTargetRef

metrics

type

The type can be Resource, Pods, Object.

resource

target

type

AverageValue/averageValue, Utilization/averageUtilization