반응형
추가 해서 정리해봤습니다.
Advanced HPA in Kubernetes
We will go deeper into HPA and will see what’s really inside of it. We will also explore what we can do with it at a more advanced level.
www.kloia.com
EKS AutoScaling - 1. HPA 설정하기
HPA가 어떤 조건에서 움직이는지, 어떠한 옵션이 있는지 아래 링크에서 확인할 수 있습니다. github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md kubernetes/autoscaler Autoscaling compon..
aws-diary.tistory.com
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: backend-hpa
namespace: wsi-skills-namespace
spec:
scaleTargetRef:
apiVersion: apps/v1 #적용할 Pod에 API Version
kind: Deployment #적용할 Pod에 Object ReplicaSet, Deployment 등
name: backend-deployment #모니터링할 대상(Pod) 이름
minReplicas: 2 #min size Pod
maxReplicas: 4 #max size Pod
metrics:
- type: Resource #type: resource
resource:
name: cpu #Pod 리소스 중 CPU 선택
target:
type: Utilization #CPU 사용률에 대해서 체크
averageUtilization: 50 #평균 CPU 값
behavior: #이 필드는 크기 조정 동작을 구성하는 선언적 방법
scaleDown:#이러한 필드는 축소 작업
stabilizationWindowSeconds: 300
policies: #이 필드는 스케일링이 실제로 어떻게 일어나는지를 나타냅니다. 이것은 배열 기반 필드입니다.
- type: Pods #이 필드는 주어진 정책에 대한 값의 유형을 나타냅니다
value: 1 #이 필드는 지정된 정책의 유형 값을 나타냅니다.
periodSeconds: 60
scaleUp:#이러한 필드는 확장 작업
stabilizationWindowSeconds: 0 #stabilizationWindowsSeconds는 어느정도 기간동안 지켜본 후 적용할 것 인지 지정
policies: #이 필드는 스케일링이 실제로 어떻게 일어나는지를 나타냅니다. 이것은 배열 기반 필드입니다.
- type: Percent #이 필드는 주어진 정책에 대한 값의 유형을 나타냅니다
value: 100 #이 필드는 지정된 정책의 유형 값을 나타냅니다.
periodSeconds: 60 #이 필드는 주어진 정책에 대한 조정 작업 사이의 기간을 나타냅니다.
반응형
'2022년 전에 정리한 문서들' 카테고리의 다른 글
ALB 리스너 - 리디렉션 Pod 부하 (0) | 2022.08.24 |
---|---|
EKS - Cluster Autoscaler (0) | 2022.08.24 |
EKS - Horizontal Pod Autoscaling(Memory) - Pod (0) | 2022.08.24 |
EKS - Horizontal Pod Autoscaling(CPU) - Pod (0) | 2022.08.24 |
EKS - Internal ALB Node Objects(Backend) - 1.22 Version (0) | 2022.08.24 |