레플리카셋이란?
파드의 수를 늘리고 싶다면? (Scale-out)
레플리카셋 (ReplicaSet)
- 정해진 수의 파드가 항상 실행될 수 있도록 관리
기존 실행중이던 파드에 문제가 생기면 파드를 다시 스케줄링 - ReplicationController의 신규 버전 (현재는 Deprecated)
레플리카셋의 동작원리
ReplicaSet Controller가 Control Plane(마스터 노드)에 존재
spec.selector에 대응되는 파드의 수가 spec.replicas와 동일한지 지속적으로 검사하고, 다를 경우 스케일 아웃 혹은 인 진행
레이블 셀렉터 (Label Selector)
쿠버네티스 오브젝트는 모두 metadata.labels 에 Key - Value
형태의 레이블 값을 가짐
특정 오브젝트 목록을 필터링하기위한 기능이 Label Selector matchLabels와 matchExpressions 옵션 제공
많은 쿠버네티스 API 리소스가 Label Selector을 통해 기능을 제공합니다. => 리소스 간 느슨한 결합 유지 (Loosely Coupled)
참조: https://fastcampus.co.kr/dev_online_awsdevops
'DevOps. > Kubernetes' 카테고리의 다른 글
[Kubernetes] Service (서비스) (0) | 2022.02.02 |
---|---|
[Kubernetes] Deployment (디플로이먼트) (0) | 2022.02.02 |
[Kubernetes] 파드 (Pod) (0) | 2022.02.02 |
[Kubernetes] kubectl 명령형과 선언형 방식 (0) | 2022.02.01 |
[Kubernetes] API 리소스 (0) | 2022.02.01 |