Part 3: MSA 배포 및 카나리

난이도: 고급 (Advanced) 예상 소요 시간: 60분 마지막 업데이트: 2026년 2월 23일

학습 목표

  • ArgoCD 멀티 클러스터 MSA 배포

  • Argo Rollouts Canary 배포 및 AnalysisTemplate 구성

  • OpenTelemetry auto-instrumentation 적용

아키텍처 개요

MSA Service Map
spinner

Step 3.1: MSA 애플리케이션 소개

서비스 구성

서비스
언어/프레임워크
포트
역할
OTel SDK

api-gateway

Go / Gin

8080

API 라우팅, 인증

Manual

order-service

Python / FastAPI

8000

주문 CRUD

Auto (opentelemetry-instrument)

payment-service

Java / Spring Boot

8080

결제 처리

Auto (javaagent)

notification-service

Node.js / Express

3000

알림 발송

Auto (@opentelemetry/auto-instrumentations-node)

analytics-batch

Python / Pandas

-

배치 분석

Auto (opentelemetry-instrument)

Git 저장소 구조

서비스 코드 예시

API Gateway (Go)

Order Service (Python/FastAPI)

Payment Service (Java/Spring Boot)

Notification Service (Node.js/Express)

Dockerfile 예시

Order Service Dockerfile

Payment Service Dockerfile


Step 3.2: Karpenter NodePool 구성

Step 3.2.1: Service Cluster Karpenter 설정


Step 3.3: KEDA ScaledObject 구성

Scaler
Target Service
Trigger
Scale 기준

SQS

notification-service

SQS Queue Depth

메시지 > 10개

Prometheus

order-service

Request Rate

RPS > 100

Step 3.3.1: KEDA 설치

Step 3.3.2: SQS Scaler (notification-service)

Step 3.3.3: Prometheus Scaler (order-service)


Step 3.4: ArgoCD Application/ApplicationSet

Step 3.4.1: App-of-Apps 패턴

Step 3.4.2: ApplicationSet (서비스별)


Step 3.5: 초기 배포 확인

예상 결과

Application
Sync Status
Health Status

api-gateway

Synced

Healthy

order-service

Synced

Healthy

payment-service

Synced

Healthy

notification-service

Synced

Healthy


Step 3.6: OTel Auto-Instrumentation 구성

서비스
언어
Instrumentation 방식
설정 방법

api-gateway

Go

Manual SDK

코드에 직접 통합

order-service

Python

Auto (opentelemetry-instrument)

Dockerfile ENTRYPOINT

payment-service

Java

Auto (javaagent)

-javaagent JVM 옵션

notification-service

Node.js

Auto (auto-instrumentations-node)

-r 플래그

analytics-batch

Python

Auto (opentelemetry-instrument)

Dockerfile ENTRYPOINT

Step 3.6.1: OTel 환경 변수 ConfigMap

Step 3.6.2: 서비스별 Deployment에 환경 변수 적용

Step 3.6.3: Java 서비스 (Payment) - javaagent 설정


Step 3.7: Argo Rollouts Canary 배포

Canary 배포 상태 다이어그램

spinner

Step 3.7.1: Rollout 리소스

Step 3.7.2: AnalysisTemplate

Step 3.7.3: Service 리소스


Step 3.8: 의도적 실패 주입 및 자동 롤백

Step 3.8.1: 버그가 있는 v2 버전 배포

Step 3.8.2: 자동 롤백 확인

예상 결과


검증 (Verification)

Argo Rollouts Dashboard

Grafana에서 트래픽 분할 확인

검증 항목

항목
확인 방법
예상 결과

ArgoCD Sync

argocd app list

All Synced/Healthy

MSA Pods

kubectl get pods -n msa

All Running

OTel Traces

Grafana Tempo

Traces visible

KEDA ScaledObject

kubectl get scaledobject -n msa

Active

Rollout Status

kubectl argo rollouts status

Healthy


참조 문서


다음 단계

MSA 배포가 완료되었습니다. Part 4: 부하 테스트 및 스케일링로 진행하여 실제 부하 상황에서의 Observability를 확인합니다.

마지막 업데이트