Zalenium grid container returns 403 forbidden -nginx

5/28/2018

I am running selenium tests on the zalenium grid. Currently configured to run 4 grid docker containers to run the Selenium tests. 2 containers seems to run the tests fine against the application URL and 2 other containers return 403 Forbidden from nginx while running the tests against the same application URL.

The traffic is routed to application via ingress which has the IP whitelisted range of the kubernetes nodes where the container is currently running.

-- Avi
docker
kubernetes
kubernetes-ingress
nginx
zalenium

1 Answer

6/10/2018

As Zalenium creates a local grid dynamically with docker containers, the issue was with one of the containers constantly giving a 403 Forbidden error because the worker node's IP where the POD was running was whitelisted and not the public IP of the POD through which the traffic is routed. This was because of newly added Availability ZONE. the NAT gateway IP of the newly added Availability zone had to be whitelisted in the ingress of the application which was being tested.

-- Avi
Source: StackOverflow