Exemplo do uso do ingress canary pelo header X-Canary: true
kubectl apply -f examples/by-header/deployments/production.yml
kubectl apply -f examples/by-header/services/production.yml
kubectl apply -f examples/by-header/ingress-routes/production.yml
for i in $(seq 1 10); do
curl -s --resolve echo.prod.mydomain.com:80:$(minikube ip) echo.prod.mydomain.com | grep "Hostname"
done
Deploy dos recursos canary:
kubectl apply -f examples/by-header/deployments/canary.yml
kubectl apply -f examples/by-header/services/canary.yml
kubectl apply -f examples/by-header/ingress-routes/canary.yml
for i in $(seq 1 10); do
curl -s --resolve echo.prod.mydomain.com:80:$(minikube ip) echo.prod.mydomain.com -H "X-Canary: true" | grep "Hostname"
done
Hostname: canary-5fdf8c5579-ghj5z
Hostname: canary-5fdf8c5579-ghj5z
Hostname: canary-5fdf8c5579-ghj5z
Hostname: canary-5fdf8c5579-ghj5z
Hostname: canary-5fdf8c5579-ghj5z
Hostname: canary-5fdf8c5579-ghj5z
Hostname: canary-5fdf8c5579-ghj5z
Hostname: canary-5fdf8c5579-ghj5z
Hostname: canary-5fdf8c5579-ghj5z
Hostname: canary-5fdf8c5579-ghj5z