I'm using Scalatest and Selenium for testing. The Selenium Hub and the Chrome node are running on 2 Kubernetes Pods.
I have the webservice I need to test on another pod. It has an internal address http://myui.dev/. It's not accessible from outside.
The test continue to fail. When the webdriver is trying to reaching the internal url the page is getting is the ERR_CONNECTION_TIMED_OUT page on Chrome.
I tried to:
So, my best guess it's that for some reason it's not taking or overriding the /etc/resolv.conf inside the container.
Any idea how to fix this?
Some configuration that could be helpful:
The pod configuration:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
service: selenium-chrome
name: selenium-chrome
spec:
replicas: 1
strategy: {}
template:
metadata:
labels:
service: selenium-chrome
spec:
containers:
- env:
- name: HUB_HOST
value: selenium-hub
- name: NODE_MAX_INSTANCES
value: "10"
- name: NODE_MAX_SESSION
value: "10"
image: selenium/node-chrome:latest
name: selenium-chrome
volumeMounts:
- mountPath: /dev/shm
name: extended-mem
imagePullPolicy: Always
resources: {}
restartPolicy: Always
volumes:
# extended memory for the browser
- name: extended-mem
hostPath:
path: /dev/shm
status: {}
UPDATE [25/06/2018]:
I've figure it out. Apparently wasn't a dns problem. As Matthew suggested it's not a DNS problem. Indeed when I run:
kubectl run selenium-hub --image selenium/hub --port 4444
kubectl expose deployment selenium-hub --type=NodePort
kubectl run selenium-node-chrome --image selenium/node-chrome --env="HUB_PORT_4444_TCP_ADDR=selenium-hub" --env="HUB_PORT_4444_TCP_PORT=4444"
it works.