Kubernetes version rollout verification¶
In Kubernetes development environments, verifying a new application version rollout typically involves using kubectl to inspect cluster state and using tools like curl to perform runtime checks^[400-devops__06-Kubernetes__k8s-learning__08-collect__README.md].
Verification Commands¶
To inspect the deployed objects, use the following command to display all resources in the current namespace, including Pods, Services, and Deployments^[400-devops__06-Kubernetes__k8s-learning__08-collect__README.md].
[kubectl](<./kubectl.md>) get all -owide
For functional testing of the application, local network access to the cluster services is often required. This can be achieved using kubectl port-forward to expose the service locally^[400-devops__06-Kubernetes__k8s-learning__08-collect__README.md].
[kubectl port-forward](<./kubectl-port-forward.md>) service/svc-myapp 8080:80 --address 0.0.0.0
Traffic Testing¶
After establishing access, repeated requests can be sent to the service endpoint to simulate load or verify load balancing behavior. This is often done using a loop to generate multiple HTTP requests sequentially^[400-devops__06-Kubernetes__k8s-learning__08-collect__README.md].
for i in {1..10}
do
curl localhost:8000
done
Response Analysis¶
Verification often involves checking the response body for specific version indicators. For example, in a multi-version rollout (such as v1 and v2), consecutive requests may display alternating version strings, confirming that traffic is being routed to different backend pods^[400-devops__06-Kubernetes__k8s-learning__08-collect__README.md].
Hello MyApp | Version: v1 | ...Hello MyApp | Version: v2 | ...
Related Concepts¶
Sources¶
- 400-devops__06-Kubernetes__k8s-learning__08-collect__README.md