Kubernetes Demo in which we start up a selenium hub deployment, and then use the selenium browsers to do a web crawl.
minikube delete
minikube start --cpus=2 --memory=4G
The kubernetes dashboard is a visual kubernetes administration tool that shows the current state of the cluster in a nice overview. Normally this should be installed seperately, but with minikube it's included.
minikube dashboard
kubectl apply -f .
kubectl port-forward service/selenium-hub 4444:4444
Run the cells in the crawl_example jupyter notebook to execute a web crawl that will fetch email adresses from some pages. The script will use a selenium browser from the kubernetes cluster.
Congrats!, you've deployed a scalable & usable selenium grid inside a local kubernetes cluster.
To fully show the ease of deployment in kubernetes we'll switch the selenium deployment with a 'Zalenium' Deployment. This is a clone of selenium with a lot of extra features.
kubectl delete -f .
git clone https://github.com/zalando/zalenium
cd zalenium
kubectl create namespace zalenium
helm install zalenium --namespace zalenium charts/zalenium --set hub.serviceType=NodePort
kubectl port-forward -n zalenium service/zalenium 4444:80
Check this url to see if the zalenium admin page shows up. If so, run the crawl_example notebook again to see the crawl happening on the admin page.