app. All day and all night it writes a line every time someone does something on the website: a user logs in, someone opens a page, a login fails. Each of those lines is a tiny piece of evidence. So where does Bob go to read last night’s evidence?

Tip:
kubectl logs --previous can show logs from a previous container instance, but only when the container restarted in place. It cannot recover logs from a pod that was deleted and removed from the node.app writes into a folder on whichever node it lands. If the incident touched pods on multiple nodes, Bob would need to open terminals on each node, search and copy lines into a notepad, and align timestamps by hand. That might work on a quiet afternoon, but it’s hopeless at 3 a.m. with the site down.
Design the solution starting from the problem:
- Each log line should leave the node as soon as it’s written, before pods are replaced.
- Logs need a single durable home that keeps them after pods are gone and can index millions of lines for fast lookup.
- Bob needs a simple search-and-visualize window so he can type a username and see every related line in order.


- Start Elasticsearch correctly (StatefulSet + PVs) so data survives restarts.
- Deploy Fluentd as a DaemonSet so logs are collected from every node as soon as they’re written.
- Deploy Kibana (Deployment) and point it at Elasticsearch.
- Once logs flow, add health checks, alerts, scaling rules, access controls, and parsing/enrichment rules.
app. Fluentd picks it up on the node. Elasticsearch stores it as a document. Bob finds it in Kibana minutes or months later. Every log moves that line further along its trip.
But before Bob adds a single new pod, he should inventory what’s actually running in his cluster. Below that line is the next set of questions: what nodes exist, what logging agents are present, and what persistent volumes are available? Those answers determine how to bootstrap EFK safely and reliably.
Links and References
- Fluentd: https://www.fluentd.org/
- Elasticsearch: https://www.elastic.co/elasticsearch/
- Kibana: https://www.elastic.co/kibana
- Kubernetes logging concepts: https://kubernetes.io/docs/concepts/cluster-administration/logging/