Port forward Elasticsearch Head to Kubernetes Statefulset

If you prefer Elasticsearch Head to oversee cluster-wide operations but miss having it installed on-cluster (now that it is not available ES v5 and above) plus run Elasticsearch as a Kubernetes Statefulset, then you can run Elasticsearch Head as a Chrome plugin and port forward to the Statefulset.

This assumes that you have installed Elasticsearch in a standard way such as via the Elastic Helm chart, and that you have a Statefulset with Pods named elasticsearch-n and a Service named elasticsearch pointing to the Statefulset.

If you then point Elasticsearch Head at localhost:9200 (which is the default) it will port forward to your Kubernetes cluster and the overview should populate.

Add comment