본문 바로가기
Development/Docker&Kubernetes

[K8S] Replica Set vs Replication Controller 차이

by 폴피드 2019. 5. 8.
728x90
반응형

ReplicaSet 은 Replicatation Controller 의 새로운 버전이다.

 

다른것은 다 동일한데 아래와 같은 차이점이 존재 한다.

 

ReplcaSet : Set-based Selectors

Replicatation Controller : Equality-based Selectors

 

  Equality-based  Set-based
support  Service, Replication Controller Job, Deployment, ReplicaSet, Daemon Set
Operation  =, ==, != in, notin, exists
Example  enviroment=prd enviroment in (prd)
Command Line kubectl get pods -l enviroment=prd kubectl get pods -l 'enviroment in (prd)'
Manifest selector: 
  enviroment: prd
selector:
 matchExpressions: 
   - {key: enviroment, operation: In, values: [prd]}

 

추가적으로 sectors 에 matchLabels 가 존재할 경우 아래와 같은 차이점이 있다.

Manifest

selector:
  app: nginx 

selector: 
  matchLabels: 
     app: nginx
support  Services, Replication Controller ReplicaSets, Deployments, Jobs, DaemonSet|

 

참고자료

https://www.youtube.com/watch?v=Y5ADo_tjfIs&list=PLMPZQTftRCS8Pp4wiiUruly5ODScvAwcQ&index=19

728x90
반응형