selenium grid with kubernetes

Setting up Selenium Grid on Kubernetes

Selenium Grid – 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.
We shall be running a Kubernetes environment using Minikube for simplicity purpose.

Minikube runs a single-node Kubernetes cluster inside a VM on your laptop for users looking to try out Kubernetes.

Kubernetes 101

  • Pod: A group of containers
  • Labels: Labels for identifying pods
  • Kubelet: Container Agent
  • etcd: A metadata service
  • Proxy: A load balancer for pods
  • Replication Controller: Manages replication of pods

Bringing up Selenium hub:

To access the selenium-hub externally, we need to expose it

You can access the URL of the Selenium-Hub via

It would show up something like this:

Bringing up a Selenium Node:

Let’s spin up a Selenium Chrome Node

Let’s spin up a Selenium Firefox Node

Scaling Selenium Grid cluster:

Problems with standalone Docker Load Balancer

Docker Containers & Host
Running a server cluster on a set of Docker containers, on a single Docker host is vulnerable to the single point of failure!

Kubernetes Cheatsheet


You shall take a look at my Github project here: Kubernetes-docker-selenium


One good feature of the Kubernetes is that, if the pod(a Node -Chrome or firefox browser) goes down, it automatically restarts a fresh instance, without us needing to restart or maintain it.

Different ways to run Kubernetes

1 thought on “Setting up Selenium Grid on Kubernetes”

Leave a Comment