This article reviews deployment strategies, service verification, and traffic management for safe application rollouts.
In this lesson, we will review the deployment strategies used in our lab exercise. This guide details how to identify the deployment strategy, verify service configurations, and gradually shift traffic between application versions for a safe rollout.
To confirm that the web application is running, click the web app button provided in the interface. This step verifies that the application is accessible and functioning as expected.
Reload the web application multiple times to observe consistency in responses from the running version.
Question 4: Traffic Splitting with a New Deployment
A new deployment, frontend-v2, has been created in the default namespace with an updated image. The goal is to divert less than 20% of traffic to this new version, while keeping the total number of pods unchanged.
Verify both deployments:
Copy
Ask AI
root@controlplane ~ ➜ kubectl get deploymentsNAME READY UP-TO-DATE AVAILABLE AGEfrontend 5/5 5 5 2m43sfrontend-v2 2/2 2 2 35s
With the same selector (app=frontend), traffic is balanced across 7 pods (5 for frontend and 2 for frontend-v2), meaning frontend-v2 receives approximately 28% of the traffic.
To reduce the traffic to about 16.7%, scale down frontend-v2 to 1 replica:
root@controlplane ~ ➜ kubectl get deploymentsNAME READY UP-TO-DATE AVAILABLE AGEfrontend 5/5 5 5 4m52sfrontend-v2 1/1 1 1 2m44s
With a total of 6 pods now running, frontend-v2 receives roughly 16.7% of the traffic. Refresh the application in your browser several times to observe any version changes when a request is routed to frontend-v2.