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

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 11: Line 11:
   name: example
   name: example
  spec:
  spec:
   minReplicas: 1
   [[#minReplicas|minReplicas]]: 1
   maxReplicas: 5
   [[#maxReplicas|maxReplicas]]: 5
   scaleTargetRef:
   [[#scaleTargetRef|scaleTargetRef]]:
     apiVersion: apps/v1
     apiVersion: apps/v1
     kind: Deployment
     kind: Deployment
     name: httpd
     name: httpd
   metrics:
   [[#metrics|metrics]]:
     - type: Resource
     - [[#type|type]]: Resource
       resource:
       resource:
         name: cpu
         name: cpu
Line 24: Line 24:
           type: Utilization
           type: Utilization
           averageUtilization: 50
           averageUtilization: 50
=.spec Elements=
==minReplicas==
==maxReplicas==
==scaleTargetRef==
==metrics==
===type===
The type can be Resource, Pods, Object.

Revision as of 21:40, 12 October 2020

External

Internal

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.