nerdexam
Google

PROFESSIONAL-CLOUD-DEVOPS-ENGINEER · Question #79

You are building the CI/CD pipeline for an application deployed to Google Kubernetes Engine (GKE). The application is deployed by using a Kubernetes Deployment, Service, and Ingress. The application t

The correct answer is C. Update the Kubernetes Service to point to the previous Kubernetes Deployment.. In a blue/green deployment, two separate Kubernetes Deployments exist (e.g., app-blue and app-green). The Service routes traffic to one via its label selector. Rollback means updating the Service's selector to point back to the previous (stable) Deployment. kubectl rollout undo (

Submitted by luis.pe· Apr 18, 2026Building and implementing CI/CD pipelines for a service

Question

You are building the CI/CD pipeline for an application deployed to Google Kubernetes Engine (GKE). The application is deployed by using a Kubernetes Deployment, Service, and Ingress. The application team asked you to deploy the application by using the blue/green deployment methodology. You need to implement the rollback actions. What should you do?

Options

  • ARun the kubectl rollout undo command.
  • BDelete the new container image, and delete the running Pods.
  • CUpdate the Kubernetes Service to point to the previous Kubernetes Deployment.
  • DScale the new Kubernetes Deployment to zero.

How the community answered

(43 responses)
  • A
    12% (5)
  • B
    2% (1)
  • C
    77% (33)
  • D
    9% (4)

Explanation

In a blue/green deployment, two separate Kubernetes Deployments exist (e.g., app-blue and app-green). The Service routes traffic to one via its label selector. Rollback means updating the Service's selector to point back to the previous (stable) Deployment. kubectl rollout undo (A) reverts a rolling deployment's history - it does not apply to blue/green. Deleting pods (B) causes downtime and doesn't restore stable traffic. Scaling the new Deployment to zero (D) removes capacity but doesn't redirect traffic to the stable version.

Topics

#CI/CD Pipelines#Blue/Green Deployment#Kubernetes Deployment#Kubernetes Service

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVOPS-ENGINEER Practice