• Pod의 갯수를 보장

Replication Controller

  • 요구하는 pod의 갯수를 보장

  • replicas, selector,template으로 구성됨(replicationController 는 이 세개가 필요하지 않음)

  • selector를 식별자로 하여, worker노드에 띄워진 것들의 갯수가 replicas랑 동일한지 확인하다 잘못된게 있으면 template 대로 생성

  • selector의 이름은 pod가 다른경우 겹치지 않게 한다


kind:ReplicationController

spec:  
  replicas: ${val}  
  selector:  
      ${val}: ${val}  
  template:  
      ${val}
  • replicationController확인하기

    kubectl get replicationcontrollers
    kubectl get rc
  • 수정하기

    kubectl edit rc ${pod}
    kubectl scale rc ${pod_name} --replicas=${num}
  • 롤링 업데이트 : 서비스 중에 중단하지 않고 업데이트

    • 만약 버전을 바꾸는 롤링업데이트를 하려면 수정을 한 후 delete pod하면 다시 살아나는것에 반영됨

'쿠버네티스' 카테고리의 다른 글

daemonset  (0) 2022.04.04
ReplicaSet  (0) 2022.04.04
static pod / pod 리소스 / pod 변수  (0) 2022.04.03
init container / infra container (pause conatiner)  (0) 2022.03.28
livenessProbe  (0) 2022.03.28

+ Recent posts