Q: How do you forward all logs from a Kubernetes pod to Elasticsearch?
Use Fluentd or Filebeat as a DaemonSet. They read container logs from /var/log/containers/ on each node and ship to Elasticsearch. Altern...
#Kubernetes #Additional Kubernetes Scenarios (Q101-Q200) #L2 #Container Orchestration #K8s
🎙️ Candidate Opening & Architectural Context
""Kubernetes is a declarative desired state system; understanding the reconciliation loop is how you diagnose this quickly. When addressing this question, I walk the interviewer through our production incident runbook: isolating the blast radius, checking diagnostic logs and metrics, and applying a safe fix.""
Advertisement
🛠️ Production Runbook & Step-by-Step Resolution
1️⃣
Production Solution & Architecture
Use Fluentd or Filebeat as a DaemonSet. They read container logs from /var/log/containers/ on each node and ship to Elasticsearch. Alternatively: configure your app to log in JSON format to stdout, and the DaemonSet collects and forwards.
💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: Use Fluentd or Filebeat as a DaemonSet. They read container logs from /var/log/containers/ on each node and ship to Elasticsearch.."
⚡ 60-Second Elevator Pitch Talking Points
- Immediate Triage: Use Fluentd or Filebeat as a DaemonSet. They read container logs from /var/log/containers/ on e
- Run targeted verification commands before modifying configuration.
- Automate permanent guardrails (CI check, alerts, IaC policy) to prevent recurrence.
Advertisement