Kubernetes Horizontal Pod Autoscaler Manifest: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 6: Line 6:
* [[Kubernetes_Horizontal_Pod_Autoscaler#HPA_Manifest|Horizontal Pod Autoscaler]]
* [[Kubernetes_Horizontal_Pod_Autoscaler#HPA_Manifest|Horizontal Pod Autoscaler]]
=Overview=
=Overview=
=Version=
==Version 2 beta 2==
==Version 2 beta 2==
apiVersion: autoscaling/v2beta2
{{Internal|Kubernetes Horizontal Pod Autoscaler Manifest Version 2 beta 2|Version 2 beta 2}}
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


==Version 1==
==Version 1==
{{Internal|Kubernetes Horizontal Pod Autoscaler Manifest Version 1|Version 1}}
  apiVersion: autoscaling/v1
  apiVersion: autoscaling/v1
  kind: HorizontalPodAutoscaler
  kind: HorizontalPodAutoscaler

Revision as of 21:36, 12 October 2020

External

Internal

Overview

Version

Version 2 beta 2

Version 2 beta 2

Version 1

Version 1
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
  name: httpd
spec:
  maxReplicas: 10
  minReplicas: 1
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: httpd
  targetCPUUtilizationPercentage: 50