속사정: Argo Rollouts 1.8이 Kubernetes 1.33 및 Prometheus 3.1과 함께 Canary Deployments를 구현하는 방법
I’m happy to translate the article for you, but I need the actual text you’d like translated. Could you please paste the content (or the portion you want translated) here? I’ll keep the source line and all formatting exactly as you requested.
전제 조건 및 스택 호환성
Argo Rollouts 1.8은 Kubernetes 1.33의 향상된 워크로드 API를 활용하도록 설계되었으며, Deployment 및 ReplicaSet 라이프사이클 훅에 대한 안정적인 지원과 저지연 카나리 분석을 위한 Prometheus 3.1의 네이티브 히스토그램 메트릭을 포함합니다. 주요 호환성 주의 사항:
- **Kubernetes 1.33+**가 필요합니다. 이는 Argo Rollouts의 새로운
Rollout컨트롤러 어드미션 웹훅이 카나리 구성을 생성 시점에 검증하기 위해 요구됩니다. - Prometheus 3.1의
prometheus-operatorv0.70+ 통합은 카나리 분석 규칙에 대한 자동 메트릭 스크래핑을 가능하게 합니다. - Argo Rollouts 1.8은 1.28 이하의 Kubernetes 버드에 대한 지원을 중단했으며, 이는 업스트림 폐기 정책과 일치합니다.
Argo Rollouts 1.8 카나리 아키텍처
핵심 Argo Rollouts 1.8 카나리 워크플로는 K8s 1.33 및 Prometheus 3.1에 맞게 업데이트된 세 가지 구성 요소에 의존합니다:
| 구성 요소 | 역할 |
|---|---|
| Rollout Controller | Rollout 커스텀 리소스(CR)를 감시하고, 카나리 ReplicaSet 생성을 관리하며, 트래픽 분할을 위해 Kubernetes Service 및 Ingress 객체를 업데이트합니다. |
| Analysis Controller | Prometheus 3.1에 쿼리하여 카나리 건강 지표를 수집하고, 분석 템플릿을 평가한 뒤, 카나리를 진행하거나 중단하도록 Rollout Controller에 신호를 보냅니다. |
| Metrics Server | K8s 1.33의 kube-proxy와 Prometheus 3.1 익스포터에서 실시간 트래픽 및 오류율 메트릭을 집계합니다. |
Under‑the‑Hood Traffic Splitting with Kubernetes 1.33
Kubernetes 1.33은 Service traffic policy 향상에 대한 안정적인 지원을 도입했으며, Argo Rollouts 1.8은 이를 활용해 서드‑파티 서비스 메시 없이 카나리 트래픽 분할을 구현합니다(메시 통합도 여전히 지원됩니다).
Workflow
Rollout CR이 새로운 컨테이너 이미지로 업데이트되면 Rollout Controller는 다음을 수행합니다:
- 새 이미지를 사용한 카나리
ReplicaSet을 생성하고, 초기에는 0개의 복제본으로 스케일링합니다. - 기본
Service선택자를 업데이트하여 카나리 파드에는rollout.argoproj.io/canary: "true"라벨을, 안정 파드에는rollout.argoproj.io/stable: "true"라벨을 포함시킵니다. - K8s 1.33의
EndpointSliceAPI를 이용해Rollout스펙에 정의된 카나리 비율에 따라 안정EndpointSlice와 카나리EndpointSlice객체 간에 트래픽을 분할합니다.
Example Rollout traffic‑splitting snippet
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: canary-demo
spec:
replicas: 10
strategy:
canary:
steps:
- setWeight: 10
- pause: {duration: 5m}
- setWeight: 50
- pause: {duration: 10m}
- setWeight: 100
trafficRouting:
kubernetes:
service: canary-demo-svc
ingress:
name: canary-demo-ingress
selector:
matchLabels:
app: canary-demo
template:
metadata:
labels:
app: canary-demo
spec:
containers:
- name: demo-app
image: demo-app:v2.0.0
ports:
- containerPort: 8080
Prometheus 3.1 통합을 이용한 카나리 분석
Argo Rollouts 1.8은 Prometheus 3.1의 기본 히스토그램 및 지수 버킷 메트릭을 활용하여 이전 버전보다 낮은 쿼리 지연 시간으로 카나리 상태를 평가합니다. Analysis Controller는 PrometheusQuery API를 사용해 설정 가능한 간격으로 Prometheus 3.1을 폴링한 뒤, 결과를 사용자 정의 성공 임계값과 비교합니다.
Prometheus 3.1용 AnalysisTemplate 예시
apiVersion: argoproj.io/v1alpha1
kind: AnalysisTemplate
metadata:
name: prometheus-canary-analysis
spec:
metrics:
- name: error-rate
successCondition: result[0] 0.05
provider:
prometheus:
address: http://prometheus.istio-system.svc:9090
query: |
sum(rate(http_requests_total{app="canary-demo", status=~"5.."}[5m])) /
sum(rate(http_requests_total{app="canary-demo"}[5m]))
Prometheus 3.1의 새로운 remote_write 최적화는 메트릭 지연을 1초 미만으로 줄여, Argo Rollouts 1.8이 거의 실시간에 가까운 속도로 카나리 진행 결정을 내릴 수 있도록 합니다.
Argo Rollouts 1.8의 주요 최적화
K8s 1.33 및 Prometheus 3.1 통합을 넘어, Argo Rollouts 1.8은 여러 내부 개선 사항을 포함합니다:
- 메모리 사용량 감소 – K8s 1.33의 공유 인포머 캐시 최적화 덕분에 Rollout Controller의 메모리 사용량이 약 30 % 감소합니다.
- Prometheus 3.1
exemplar메트릭에 대한 네이티브 지원, 카나리 디버깅을 위한 트레이스‑메트릭 상관관계를 가능하게 합니다. - 향상된 카나리 중단 로직 – Prometheus 3.1이 임계값 초과를 보고하면 Rollout Controller가 자동으로 카나리
ReplicaSet을 축소하고 2초 이내에 안정 버전으로 트래픽을 100 % 복구합니다.
결론
Argo Rollouts 1.8은 Kubernetes 1.33 및 Prometheus 3.1과 결합되어 복잡한 서비스 메시 구성에 의존하지 않고도 견고하고 저지연 카나리 배포 워크플로를 제공합니다. K8s 1.33의 트래픽 라우팅 API와 Prometheus 3.1의 고성능 메트릭 엔진이 긴밀하게 통합되어 현대적인 클라우드 네이티브 워크로드를 운영하는 팀에게 이상적인 선택이 됩니다.
프로덕션 Kubernetes 워크로드.
전체 릴리스 노트를 보려면 Argo Rollouts 1.8 변경 로그를 참조하세요.