You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Check DestinationRule
kubectl get destinationrule -n cyan -o yaml
# View load balancer configuration
kubectl get destinationrule cyan-ds -n cyan -o yaml | grep -A 3 loadBalancer
Testing
Test Load Distribution
# Create test pod
kubectl exec -n red sleep-red -- curl http://cyan-echo.cyan.svc.cluster.local/normandy
# Check logs
kubectl logs -n cyan cyan-echo -c cyan-echo
Verify Round Robin Behavior
# Continuous testing to observe round robin
kubectl exec -n red sleep-red -- sh -c ' for i in $(seq 1 10); do echo " Request $i: $(curl -s http://cyan-echo.cyan.svc.cluster.local/normandy)" done'# Should cycle through available pods in order
Verification Commands
# Verify load balancer algorithm
kubectl get destinationrule cyan-ds -n cyan -o jsonpath='{.spec.trafficPolicy.loadBalancer.simple}'# Should output: ROUND_ROBIN# Check subsets defined
kubectl get destinationrule cyan-ds -n cyan -o jsonpath='{.spec.subsets[*].name}'# Test distribution
kubectl exec sleep-red -n red -- sh -c \
'for i in $(seq 1 50); do curl -s http://cyan-echo.cyan.svc.cluster.local/normandy; done | sort | uniq -c'