-
라벨kubernetes 2023. 10. 27. 14:18
kubectl get pod -w
kubectl get pod --show-labels
kubectl get pod
kubectl get pod -L env
kubectl get pod --show-labels
kubectl get pod -L creation_method
kubectl label pod http-go customID=vip -> 지정
kubectl get pod --show-labels -> 확인
kubectl get pod -L customID -> vip 관리하는 서버
kubectl label pod http-go customID=jinsang -> 이미 존재 해서 생성 불가
kubectl label pod http-go customID=jinsang --overwrite ->
--overwrite 를 추가 해주면 바꿔진다
kubectl label pod http-go customID- -> 삭제
kubectl get pod --show-labels -> 라벨 정도
kubectl get pod -l '!env' -> '!env'가 없는거
kubectl get pod --show-labels -> 라벨 정보
kubectl get pod -l 'env=prod' -> 'env=prod' 가 있는거