TIL

Deployment

역할과 계층 구조

사용 사례

Deployment 생성

핵심 필드

생성 결과 확인

pod-template-hash 라벨

Deployment 업데이트

내부 동작 단계

기본 전략과 임계값

라벨 셀렉터 불변성

Rollover — 롤아웃 중 또 업데이트하면

업데이트 전략

Recreate

RollingUpdate

maxUnavailable

maxSurge

둘 다 0이면?

롤백

Rollout History 확인

이전 리비전으로 되돌리기

Pause와 Resume

스케일링

수동 스케일

오토스케일 (HPA 연결)

Proportional Scaling

Cleanup과 진행 데드라인

spec.revisionHistoryLimit

spec.progressDeadlineSeconds

Deployment Status 컨디션

진행 중 (Progressing)

완료 (Complete)

실패 (Failed)

상태 확인 명령어

Canary 배포 패턴

Spec 필드 레퍼런스

필드 타입 의미 기본값
replicas integer 유지할 Pod 개수 1
selector LabelSelector 관리할 Pod 식별 셀렉터. 생성 후 변경 불가 필수
template PodTemplateSpec 만들 Pod의 템플릿 필수
strategy.type string RollingUpdate 또는 Recreate RollingUpdate
strategy.rollingUpdate.maxUnavailable int·% 동시에 사용 불가가 될 수 있는 Pod 최대치 25%
strategy.rollingUpdate.maxSurge int·% desired를 일시 초과할 수 있는 Pod 최대치 25%
minReadySeconds integer Pod ready 후 available로 인정되기까지 최소 대기 초 0
revisionHistoryLimit integer 보관할 옛 ReplicaSet 수. 0이면 롤백 불가 10
paused boolean rollout 일시 중단 여부 false
progressDeadlineSeconds integer rollout 진전 없이 대기 가능한 최대 초. 초과 시 failed 600