Your engineering team is executing a blue-green deployment strategy for a stateless microservice on Google Kubernetes Engine (GKE) that relies on a Cloud SQL database. In what sequence should you execute these deployment steps to achieve a zero-downtime release?
- 1Apply backward-compatible database schema migrations that support both the current and new application versions.
- 2Deploy the new (green) application version to a separate GKE deployment without routing external user traffic to it.
- 3Run automated health checks and functional smoke tests against the green deployment's internal endpoint.
- 4Update the Cloud Load Balancing backend service configuration to point incoming production traffic from the blue deployment to the green deployment.
- 5Monitor operational metrics during a soak period, then decommission the old (blue) GKE deployment.
Cevap
The correct sequence for a zero-downtime blue-green deployment starts with applying backward-compatible database schema updates. Next, deploy the new green application version to GKE, followed by running internal smoke tests to validate its readiness. After successful validation, update Cloud Load Balancing to route user traffic to the green deployment. Finally, monitor service health and decommission the old blue deployment.
Applying backward-compatible database migrations first guarantees that active users on the blue environment experience no disruption. Deploying and validating the green application in isolation minimizes risk. Updating Cloud Load Balancing instantly shifts user traffic to the green release without dropping connections, and retaining the blue version during a brief soak period provides a quick rollback option before cleanup.
Adım Adım Çözüm
Anahtar Kavram
Blue-Green Deployment Lifecycle & Database Schema Compatibility
Tahmini Süre:1m 15s