TIL

Working with Kubernetes Objects

오브젝트 관리 방식

1. 명령형 커맨드 (Imperative Commands)

2. 명령형 오브젝트 설정 (Imperative Object Configuration)

3. 선언형 오브젝트 설정 (Declarative Object Configuration)

방식 작업 단위 권장 사용처
명령형 커맨드 라이브 오브젝트 개발·실험
명령형 오브젝트 설정 파일 단위 프로덕션 (단일 writer)
선언형 오브젝트 설정 디렉터리 단위 프로덕션 (여러 writer, 감사 필요)

이름과 UID

Label과 Selector

셀렉터

kubectl에서 쓰기

kubectl get pods -l 'environment=production,tier!=frontend'
kubectl get pods -l 'environment in (production, qa)'

Namespace

Annotation

Field Selector

Finalizer

Owner와 Dependent

캐스케이딩 삭제

Finalizer vs Owner Reference