응답 계속 진행
Blue/Green 배포에는 두 개의 Service가 필요합니다. active와 preview입니다.
• notiflex-api (active): 실제 트래픽을 받는 Service입니다. 현재 안정 버전(Blue)을 가리킵니다.
• notiflex-api-preview: 새 버전(Green)을 미리 확인하는 Service입니다.
Argo Rollouts가 배포를 진행할 때 순서는 이렇습니다.
1. 새 ReplicaSet(Green)을 생성하고 Pod가 Ready될 때까지 대기
2. preview Service를 Green Pod에 연결
3. autoPromotionSeconds(30초) 대기
4. active Service를 Green Pod로 전환
5. 이전 ReplicaSet(Blue)을 축소
k8s/smb/service-preview.yaml
apiVersion: v1
kind: Service
metadata:
name: notiflex-api-preview
namespace: notiflex
spec:
selector:
app: notiflex-api
ports:
- port: 80
targetPort: 8080