Skip to main content

Setup Elastic Search and Kibana Open Source

https://itnext.io/elasticsearch-kibana-on-k8s-w-rancher-desktop-rancher-cluster-manager-2-6-f155c86164c0

Add the Jetstack Helm repository

helm repo add jetstack https://charts.jetstack.io

Update your local Helm chart repository cache

helm repo update

Install the cert-manager Helm chart -

https://cert-manager.io/docs/installation/helm/

helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --set installCRDs=true --version v1.9.1 --wait

Deploy Rancher Cluster Manager via helm

RANCHER_SERVER_HOSTNAME="rancher.localhost"
helm repo add rancher-latest https://releases.rancher.com/server-charts/latest
helm repo update
kubectl create namespace cattle-system
helm install rancher rancher-latest/rancher --namespace cattle-system --set hostname=${RANCHER_SERVER_HOSTNAME} --set bootstrapPassword=admin --wait

Get Password

kubectl get secret --namespace cattle-system bootstrap-secret -o go-template='{{.data.bootstrapPassword|base64decode}}{{ "\n" }}'

Visit dashboard

https://rancher.localhost/

Add Elastic Repo

helm repo add elastic https://helm.elastic.co
docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2

Update the ports to open 9200 and 9300 and be sure to set the service type to Cluster IP Add the env var

discovery.type=single-node

Set deployment for Kibana

docker.elastic.co/kibana/kibana-oss:7.10.2

Update the ports to open 5601 — set the service type to Cluster IP Set an env var for

ELASTICSEARCH_HOSTS=http://es:9200

Set Ingress

Namespace: es
Name: kibana.rancher.localhost
Rules.Request Host: kibana.rancher.localhost
Rules.Pods.Path: /
Rules.Pods.Target Service: kibana (select)
Rules.Pods.Port: 5601 (select)

Set Ingress for es

es.rancher.localhost
Port 9200

Visit Kibana

http://kibana.rancher.localhost

Set port-forward at Rancher Desktop

Set according to ES and Kibana