Back to all scenarios
Scenario #189
Networking
K8s v1.22, AWS EKS
Traffic Splitting Failure Due to Incorrect Service LoadBalancer Configuration
Traffic splitting between two microservices failed due to a misconfiguration in the Service LoadBalancer.
Find this helpful?
What Happened
The load balancing rules were incorrectly set up for the service, which caused requests to only route to one instance of a microservice, despite the intention to split traffic between two.
Diagnosis Steps
- 1Used kubectl describe svc to inspect the Service configuration and discovered incorrect annotations for traffic splitting.
- 2Analyzed AWS load balancer logs and saw that traffic was directed to only one pod.
Root Cause
Misconfigured traffic splitting annotations in the Service definition prevented the load balancer from distributing traffic correctly.
Fix/Workaround
• Corrected the annotations in the Service definition to enable proper traffic splitting.
• Redeployed the Service and tested that traffic was split as expected.
Lessons Learned
Always double-check load balancer and service annotations when implementing traffic splitting in a microservices environment.
How to Avoid
- 1Test traffic splitting configurations in a staging environment before applying them in production.
- 2Automate the verification of load balancer and service configurations.