2023.09.12 - [인프라/AWS] - AWS - EKS 실습
AWS - EKS 실습
AWS의 Elastic Kubernetes Service를 통해 로컬에서 만들었던 것 과 비슷한 환경을 구축 해볼 예정입니다. bastion 및 NAT Instance 겸용으로 사용할 인스턴스 한개와 두개의 워커 노드를 통해 만들어볼 예정입
younyellow.tistory.com
EKS Node Auto Scalling을 구현
Pods Auto Scalling 참고
2023.09.03 - [인프라/Kubernetes] - Kubernetes Pods Auto Scalling
Kubernetes Pods Auto Scalling
2023.08.27 - [인프라/Kubernetes] - Kubernetes 실습 및 서비스 구축 Kubernetes 실습 및 서비스 구축 예상 k8s 서비스 아키텍쳐 Kubernetes 란? 쿠버네티스는 컨테이너화된 서비스를 쉽고 빠르게 배포,확장,관리
younyellow.tistory.com
1. Pods Auto Scalling을 통해 부하가 걸리면 파드의 개수가 늘어난다.
2. 더 이상 파드가 생성될수 었어 pending상태가 되면 node auto scalling을 통해 노드를 늘려 파드가 생성 될 수 있습니다.
aws-auto-scalling.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: test-autoscaler
spec:
replicas: 10
selector:
matchLabels:
name: test-autoscaler
template:
metadata:
labels:
name: test-autoscaler
spec:
containers:
- image: sihyun2/firstservice
name: test-autoscaler
resources:
limits:
cpu: 400m
memory: 512Mi
requests:
cpu: 400m
memory: 512Mi
node-role에 AutoScalingFullAccess 정책 추가
cluster-autoscaler 설치
kubectl apply -f https://raw.githubusercontent.com/kubernetes/autoscaler/master/cluster-autoscaler/cloudprovider/aws/examples/cluster-autoscaler-autodiscover.yaml
kubectl -n kube-system annotate deployment.apps/cluster-autoscaler cluster-autoscaler.kubernetes.io/safe-to-evict="false"
<YOUR CLUSTER NAME> 수정
kubectl -n kube-system edit deploy/cluster-autoscaler
cpu자원이 부족해 Pending상태
node가 생성되면 정상 작동 하는 것 을 볼 수 있습니다.
'인프라 > AWS' 카테고리의 다른 글
EKS EFS를 통해 pv,pvc구현 (0) | 2023.09.15 |
---|---|
EKS NLB,ALB (0) | 2023.09.14 |
EKS 서비스 구축 (0) | 2023.09.13 |
다른 IAM 계정에서 EKS-Cluster 조작 방법 (0) | 2023.09.12 |
AWS NAT Gateway, NAT Instance (0) | 2023.09.12 |