This repository contains scripts and configurations for deploying the EFK (Elasticsearch, Fluent Bit, Kibana) stack on a Kubernetes cluster for centralized logging.
The EFK stack consists of:
- Elasticsearch: Database to store and index logs
- Fluent Bit: Lightweight log collector and forwarder
- Kibana: Web UI for visualizing and analyzing logs
- Kubernetes cluster
- Helm 3.x installed
kubectl
configured to access your cluster- Sufficient cluster resources as defined in the values files
Run the installation script:
./install.sh
The script will present you with the following options:
- Install Elasticsearch only
- Install Kibana only
- Install Fluent Bit only
- Install Complete Stack
- Exit
- Create the logging namespace:
kubectl create namespace logging
- Add the Elastic and Fluent Bit Helm repositories:
helm repo add elastic https://helm.elastic.co
helm repo add fluent https://fluent.github.io/helm-charts
helm repo update
- Install Elasticsearch:
helm install elasticsearch elastic/elasticsearch -f ek/elasticsearch-values.yaml -n logging
- it will take about 110 seconds to be ready
- Install Kibana:
helm install kibana elastic/kibana -f ek/kibana-values.yaml -n logging
- it will also take about 110 seconds to be ready
- Install Fluent Bit:
helm install fluent-bit fluent/fluent-bit -f fluentbit/values.yaml -n logging
kubectl port-forward svc/kibana-kibana 5601:5601 -n logging
-
http://localhost:5601
-
get the elastic user's password
$ kubectl get secrets --namespace=logging elasticsearch-master-credentials -ojsonpath='{.data.password}' | base64 -d
username
iselastic
kubectl create namespace backend
kubectl apply -f project.yml
💼 Need DevOps expertise?
📧 [email protected]
🚀 Available for hire