Orchestrating docker-selenium via Kubernetes
Kubernetes is a platform for hosting Docker containers in a clustered environment with multiple Docker hosts. Kubernetes is a system for managing containerized applications across a cluster of nodes.
Minikube runs a single-node Kubernetes cluster inside a VM on your laptop for users looking to try out Kubernetes.Basics of Kubernetes
Running a Kubernetes environment using Minikube for simplicity purpose.
$ kubectl run selenium-hub --image selenium/hub:3.4.0 --port 4444
$ kubectl expose deployment selenium-hub --type=NodePort
$ minikube service selenium-hub --url
It would show something like,
http://192.168.99.100:xxxx
$ kubectl run selenium-node-chrome --image selenium/node-chrome:3.4.0 --env="HUB_PORT_4444_TCP_ADDR=selenium-hub" --env="HUB_PORT_4444_TCP_PORT=4444"
$ kubectl run selenium-node-firefox --image selenium/node-firefox:3.4.0 --env="HUB_PORT_4444_TCP_ADDR=selenium-hub" --env="HUB_PORT_4444_TCP_PORT=4444"
$ kubectl run selenium-node-chrome --image selenium/node-chrome:3.4.0 --env="HUB_PORT_4444_TCP_ADDR=selenium-hub" --env="HUB_PORT_4444_TCP_PORT=4444"
$ kubectl -f create selenium-hub-rc.yaml
kubectl create -f selenium-hub-svc.yml
$kubectl create -f selenium-node-chrome-rc.yaml
$kubectl create -f selenium-node-firefox-rc.yaml
Helm is a tool that streamlines installing and managing Kubernetes applications. Think of it like apt/yum/homebrew for Kubernetes.
A Helm package is bundled up as a chart.
Charts are Helm packages that contain at least two things:
Charts can be stored on disk, or fetched from remote chart repositories (like Debian or RedHat packages) it users git under the hood
To get started, its as simple as:
$ helm install stable/selenium