본문 바로가기

클라우드/쿠버네티스(Kubernetes)

쿠버네티스 Kubernetes 어노테이션 (Annotation)

 

더보기

# 어노테이션
# 주석 비슷한것,검색용 아님 
# 비식별 메타데이타 
1. 정보성
2. 다른 어플리케이션이 어노케이션 특정키를 참조

# 어노테이션 추가
vagrant@k-control:~$ kubectl annotate pods ldh-pod ldhgood="good"
pod/ldh-pod annotated

# 확인 
vagrant@k-control:~$ kubectl describe pod ldh-pod
vagrant@k-control:~$ kubectl get pods ldh-pod -o yaml
Name:         ldh-pod
Namespace:    default
Priority:     0
Node:         k-node1/192.168.200.51
Start Time:   Wed, 07 Jul 2021 07:34:50 +0000
Labels:       env=dev
Annotations:  cni.projectcalico.org/podIP: 192.168.82.132/32
              cni.projectcalico.org/podIPs: 192.168.82.132/32
              ldhgood: good