쿠버네티스 Horizontal Pod Autoscaler

1 개요[ | ]

Horizontal Pod Autoscaler (HPA)
수평 Pod 오토스케일러
  • CPU 사용률 등 기타 메트릭 지정대상을 기준으로 pod 레플리카 수를 자동으로 조절하는 API 리소스
  • 주로 레플리케이션 컨트롤러, 디플로이먼트, 레플리카 셋과 함께 사용된다.
  • 스케일링될 수 없는 객체(예: 데몬셋)에는 적용 불가하다.

<img src="https://d33wubrfki0l68.cloudfront.net/4fe1ef7265a93f5f564bd3fbb0269ebd10b73b4e/1775d/images/docs/horizontal-pod-autoscaler.svg" style="width:550px"/>

apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
  name: example
  namespace: default
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: example
  minReplicas: 1
  maxReplicas: 3
  metrics:
    - type: Resource
      resource:
        name: cpu
        targetAverageUtilization: 50

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}