Skip to main content

Introduction

If you're eager to explore Elasticsearch, the renowned open-source search engine built upon the Lucene library, the best way to get started is by installing it on your local machine. While the official Elasticsearch website provides comprehensive installation instructions, they may contain more details than necessary for beginners. In this guide, we'll simplify the process for you.

Step-by-Step Guide

1. Setup Elasticsearch and Kibana

For a detailed step-by-step guide on setting up Elasticsearch and Kibana, follow this Setup Guide .

2. Adding the Jetstack Helm Repository

To start, add the Jetstack Helm repository to your Helm configuration:

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

3. Updating Your Local Helm Chart Repository Cache

Ensure that your local Helm chart repository cache is up-to-date:

helm repo update

4. Installing Cert-Manager Helm Chart

Cert-Manager is essential for managing TLS certificates. Install it using Helm:

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

5. Deploying Rancher Cluster Manager via Helm

Rancher Cluster Manager is a powerful tool for managing Kubernetes clusters. Deploy it with 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

6. Retrieving the Rancher Dashboard Password

To access the Rancher Dashboard, you'll need to retrieve the admin password:

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

7. Accessing the Rancher Dashboard

Visit the Rancher Dashboard at Rancher Dashboard.

8. Adding the Elastic Helm Repository

Add the Elastic Helm repository to your Helm configuration:

helm repo add elastic https://helm.elastic.co

9. Configuring Elasticsearch Deployment

Set up the Elasticsearch deployment using the following image:

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

Make sure to open ports 9200 and 9300 and set the service type to Cluster IP. Additionally, add the following environment variable:

discovery.type=single-node

10. Configuring Kibana Deployment

Configure the Kibana deployment with the following image:

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

Open port 5601 and set the service type to Cluster IP. Set the following environment variable to connect to Elasticsearch:

ELASTICSEARCH_HOSTS=http://es:9200

11. Setting Up Ingress

For Kibana, set up an Ingress with the following details:

  • 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)

For Elasticsearch, set up Ingress with the following details:

es.rancher.localhost
Port 9200

12. Accessing Kibana

Access Kibana at Kibana.

13. Setting Up Port Forwarding in Rancher Desktop

Configure port forwarding according to your Elasticsearch and Kibana configurations.