- Kubernetes 클러스터 내의 수백 수천가지의 object를 분류하고 filter할 필요가 있음
- 어떤 방식으로 분류를 하던 그룹화 하는데에는 labels와 selectors 가 필요함.
- metadata.labels 에 key-value 형식으로 정의함
- ReplicaSet에는 두 개의 labels가 있는데, templates 안에 있는 label은 pod의 label, metadata에 있는 label은 RS의 label임.
- RS의 spec.selector.mathLabels와 template.metadata.labels가 같아야 RS 가 관리하는 pod가 성공적으로 선택됨
'CKA' 카테고리의 다른 글
Node Selector & Affinities (0) | 2021.09.05 |
---|---|
Taints & Tolerations (0) | 2021.09.05 |
Manual Scheduling (0) | 2021.09.03 |
Declarative commands (0) | 2021.09.02 |
Imperative commands (0) | 2021.09.02 |