Kubernetes Horizontal Pod Autoscaler Manifest: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
=External=
* https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#horizontalpodautoscaler-v1-autoscaling
* https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#horizontalpodautoscaler-v2beta2-autoscaling
=Internal=
=Internal=
* [[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==
apiVersion: autoscaling/v1
{{Internal|Kubernetes Horizontal Pod Autoscaler Manifest Version 1|Version 1}}
kind: HorizontalPodAutoscaler
metadata:
  name: httpd
  managedFields:
  - apiVersion: autoscaling/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:spec:
        f:maxReplicas: {}
        f:minReplicas: {}
        f:scaleTargetRef:
          f:apiVersion: {}
          f:kind: {}
          f:name: {}
        f:targetCPUUtilizationPercentage: {}
    manager: kubectl-autoscale
    operation: Update
    time: "2020-10-06T21:09:25Z"
  - apiVersion: autoscaling/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .: {}
          f:autoscaling.alpha.kubernetes.io/conditions: {}
          f:autoscaling.alpha.kubernetes.io/current-metrics: {}
      f:status:
        f:currentCPUUtilizationPercentage: {}
        f:currentReplicas: {}
        f:desiredReplicas: {}
    manager: kube-controller-manager
    operation: Update
    time: "2020-10-06T21:10:25Z"
spec:
  maxReplicas: 10
  minReplicas: 1
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: httpd
  targetCPUUtilizationPercentage: 50
status:
  currentCPUUtilizationPercentage: 2
  currentReplicas: 1
  desiredReplicas: 1

Latest revision as of 21:37, 12 October 2020