[TIL] 쿠버네틱스, 레플리카셋

𝙃𝙖𝙞𝙡𝙚𝙮·2021년 11월 16일
0

TIL

목록 보기
6/15
post-thumbnail

이중화

https://kubernetes.io/ko/docs/concepts/workloads/controllers/replicaset/
replicas 설정을 통해 구동할 pod 개수를 2개 이상으로 설정(이중화)

apiVersion: apps/v1
kind: ReplicaSet
metadata:
  name: frontend
  labels:
    app: guestbook
    tier: frontend
spec:
  # 케이스에 따라 레플리카를 수정한다.
  replicas: 3
  selector:
    matchLabels:
      tier: frontend
  template:
    metadata:
      labels:
        tier: frontend
    spec:
      containers:
      - name: php-redis
        image: gcr.io/google_samples/gb-frontend:v3

HPA를 통한 auto scaling

때에 따라 HPA(Horizontal Pod Autoscaler) 설정을 통해 auto scaling 처리
레플리카셋은 HPA에 의해 auto scaling될 수 있다.

profile
ෆ 𝓋𝒾𝓈 𝓉𝒶 𝓋𝒾𝑒 ෆ

0개의 댓글