https://github.com/code4mk/k8s-efk-logging-setup
A one-click Kubernetes EFK (Elasticsearch, Fluentbit, Kibana) stack setup for easy log management.
https://github.com/code4mk/k8s-efk-logging-setup
devops efk efk-stack fluentbit k8s k8s-logging
Last synced: about 1 month ago
JSON representation
A one-click Kubernetes EFK (Elasticsearch, Fluentbit, Kibana) stack setup for easy log management.
- Host: GitHub
- URL: https://github.com/code4mk/k8s-efk-logging-setup
- Owner: code4mk
- Created: 2024-11-16T07:49:12.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-11-16T10:14:49.000Z (6 months ago)
- Last Synced: 2025-03-26T17:56:52.149Z (about 2 months ago)
- Topics: devops, efk, efk-stack, fluentbit, k8s, k8s-logging
- Language: Shell
- Homepage: https://www.youtube.com/watch?v=Bzk9Fhc7J6o
- Size: 8.79 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# EFK Stack Installation for Kubernetes
This repository contains scripts and configurations for deploying the EFK (Elasticsearch, Fluent Bit, Kibana) stack on a Kubernetes cluster for centralized logging.
## Overview
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## Prerequisites
- Kubernetes cluster
- Helm 3.x installed
- `kubectl` configured to access your cluster
- Sufficient cluster resources as defined in the values files## Installation
### Option 1: Automated Installation
Run the installation script:
```bash
./install.sh
```The script will present you with the following options:
1. Install Elasticsearch only
2. Install Kibana only
3. Install Fluent Bit only
4. Install Complete Stack
5. Exit### Option 2: Manual Installation
1. Create the logging namespace:
```bash
kubectl create namespace logging
```2. Add the Elastic and Fluent Bit Helm repositories:
```bash
helm repo add elastic https://helm.elastic.co
helm repo add fluent https://fluent.github.io/helm-charts
helm repo update
```3. Install Elasticsearch:
```bash
helm install elasticsearch elastic/elasticsearch -f ek/elasticsearch-values.yaml -n logging
```* it will take about 110 seconds to be ready
4. Install Kibana:
```bash
helm install kibana elastic/kibana -f ek/kibana-values.yaml -n logging
```* it will also take about 110 seconds to be ready
5. Install Fluent Bit:
```bash
helm install fluent-bit fluent/fluent-bit -f fluentbit/values.yaml -n logging
```## Accessing Kibana
```bash
kubectl port-forward svc/kibana-kibana 5601:5601 -n logging
```
* `http://localhost:5601`* get the elastic user's password
```bash
$ kubectl get secrets --namespace=logging elasticsearch-master-credentials -ojsonpath='{.data.password}' | base64 -d
```* `username` is `elastic`
# sample project deploy
```bash
kubectl create namespace backend
kubectl apply -f project.yml
```---
💼 **Need DevOps expertise?**
📧 [[email protected]](mailto:[email protected])
🚀 Available for hire