✏️ Bài tập Ngày 10: Canary & Blue/Green Deployment¶
🎯 Mục tiêu¶
- Deploy Canary rollout và quan sát traffic shifting
- Thực hiện Rollback khi Canary lỗi
- Deploy Blue/Green rollout
Bài tập 1: Canary Deployment¶
-
Cài Argo Rollouts:
-
Deploy Canary:
-
Kiểm tra trạng thái:
-
Trigger update (đổi image):
-
Quan sát canary steps:
- 10% traffic → pause 60s
- 30% traffic → pause 60s
-
60% traffic → chờ manual promote
-
Promote:
Bài tập 2: Rollback khi Canary lỗi 🚨¶
-
Trigger update mới:
-
Trong khi canary đang ở 10-30%, abort ngay:
-
Kiểm tra rollback thành công:
-
Retry để quay lại trạng thái Healthy:
Bài tập 3: Blue/Green Deployment¶
-
Deploy Blue/Green:
-
Port-forward 2 services:
-
Trigger update:
-
Kiểm tra:
http://localhost:9091→ Blue (version cũ)-
http://localhost:9092→ Green (version mới, đang preview) -
Promote:
-
Sau promote: cả 2 URL đều trỏ về Green
Bài tập 4: Dashboard UI¶
kubectl argo rollouts dashboard &
# Mở http://localhost:3100
# Xem visualization của rollout process
✅ Checklist hoàn thành¶
- [ ] Argo Rollouts cài thành công
- [ ] Canary deployment chạy với traffic shifting
- [ ] Rollback (abort) canary thành công
- [ ] Blue/Green deployment chạy
- [ ] Preview vs Active service hoạt động đúng
- [ ] Promote Blue/Green thành công
🎉 Chúc mừng! Bạn đã hoàn thành khóa học ArgoCD 10 ngày!
Bạn đã nắm được: - ✅ GitOps fundamentals - ✅ ArgoCD installation & configuration - ✅ Sync strategies & self-healing - ✅ Helm & Kustomize integration - ✅ Multi-cluster management - ✅ App of Apps & ApplicationSet patterns - ✅ RBAC & security - ✅ Progressive delivery (Canary & Blue/Green)