Q: How do you do a canary deployment on Kubernetes without a service mesh?
Use two Deployments with the same Service label selector but different replica counts:
#Kubernetes #Additional Kubernetes Scenarios (Q101-Q200) #L2 #Container Orchestration #K8s #ArgoCD
🎙️ Candidate Opening & Architectural Context
""In our production Kubernetes clusters running microservices on EKS/AKS, this was a classic operational challenge. When addressing this question, I walk the interviewer through our production incident runbook: isolating the blast radius, checking diagnostic logs and metrics, and applying a safe fix.""
Advertisement
🛠️ Production Runbook & Step-by-Step Resolution
1️⃣
Initial Diagnostics & Root Cause Analysis
Use two Deployments with the same Service label selector but different replica counts:
app-stable: 9 replicas, version v1app-canary: 1 replica, version v2
2️⃣
Remediation & Permanent Safeguards
The Service routes to all pods matching app: myapp. Traffic split ≈ 90%/10% based on replica ratio. Pros: simple, no extra tools. Cons: rough traffic split (not exact percentage), all users might hit canary randomly. For precise splits, use Argo Rollouts or Flagger.
💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: app-stable: 9 replicas, version v1."
⚡ 60-Second Elevator Pitch Talking Points
- app-stable: 9 replicas, version v1
- app-canary: 1 replica, version v2
Advertisement