Kubernetes Horizontal Pod Autoscaler Manifest: Difference between revisions
Jump to navigation
Jump to search
Line 7: | Line 7: | ||
=Overview= | =Overview= | ||
==Version 2 beta 2== | ==Version 2 beta 2== | ||
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 | |||
==Version 1== | ==Version 1== | ||
apiVersion: autoscaling/v1 | apiVersion: autoscaling/v1 |
Revision as of 03:11, 7 October 2020
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
Overview
Version 2 beta 2
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
Version 1
apiVersion: autoscaling/v1 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