0
0
Kubernetesdevops~3 mins

Why Centralized logging (EFK stack) in Kubernetes? - Purpose & Use Cases

Choose your learning style9 modes available
The Big Idea

What if you could see all your system problems in one place, instantly?

The Scenario

Imagine you run many small shops in different parts of a city. Each shop keeps its own paper logbook to track sales and issues. When you want to see how all shops are doing, you have to visit each one, read their messy notes, and try to piece together the story.

The Problem

This manual way is slow and frustrating. You waste hours traveling and reading different handwriting. You might miss important problems because some notes are lost or unclear. It's hard to find patterns or spot urgent issues quickly.

The Solution

The EFK stack (Elasticsearch, Fluentd, Kibana) collects all logs from every shop into one clean, searchable place. Fluentd gathers logs from all sources, Elasticsearch stores and indexes them, and Kibana shows them in easy-to-understand dashboards. Now you can see everything at once, find problems fast, and make smart decisions.

Before vs After
Before
ssh shop1; cat logs.txt
ssh shop2; cat logs.txt
After
kubectl logs -l app=shop
# View all logs centrally in Kibana dashboard
What It Enables

With centralized logging, you can instantly monitor all your systems together and react to issues before they become big problems.

Real Life Example

A company running hundreds of Kubernetes pods uses EFK to spot a sudden spike in error messages across pods, helping them fix a bug before customers notice.

Key Takeaways

Manual log checking is slow and error-prone.

EFK stack centralizes logs for easy searching and visualization.

This helps teams quickly find and fix issues across many systems.