Cloud/Kubernetes

[따배쿠] 9-1, 2,3. kubernetes label 쿠버네티스 레이블, node label, Annotation

Tony Lim 2022. 2. 22. 13:26
728x90

동일한 이름의 pod들을 label을 추가함으로 2차원 matrix로 분류가 가능해졌다

 

selector는 label을 고르는 툴이다.

 

Node Label

pod 의 label과 동일한데 label이 node에 적용된 것이다.

 

-L option으로 key값에 해당되는 disk, gpu만 보여줄 수 있다.

 

nodeSelector에서 선택된 node에게만 해당 pod를 띄운다.

만약 node selector에 조건에 해당되는 pod가 없다면 Pending 상태로 알맞은 node가 생길떄까지 대기할 것이다.

 

Annotation

ingress , deployment 같이 특정 resource에 정해진(key) annotation 도 존재한다.
위같은 경우는 rolling update 할때 history에 기록이된다.

아니면 부가적인 정보를 작성할때 사용된다.

 

 

 

 

728x90