Prompt

logs missing from kubernetes pods

Technology / Observability1 observationLast seen Oct 28, 2026

Latest observation

Oct 28, 2026OpenAI APIWeb search: off

If logs are missing from Kubernetes pods, the issue is usually one of these: the app isn’t writing to stdout/stderr, the pod restarted, the container log rotated, permissions/node issues, or the logging pipeline is filtering/dropping them.

Quick checks

1) Confirm the pod is healthy and running

kubectl get pods -A -o wide
kubectl describe pod <pod-name> -n <namespace>

Look for:

  • restarts
  • crash loops
  • terminated containers
  • events about disk pressure, eviction, or mount issues

2) Check current and previous container logs

kubectl logs <pod-name> -n <namespace>
kubectl logs <pod-name> -n <namespace> --previous
kubectl logs <pod-name> -n <namespace> -c <container-name>

If the app restarted, --previous is often where the logs are.

3) Verify the app logs to stdout/stderr

Kubernetes captures logs from container stdout/stderr, not from arbitrary files unless you ship them separately.

Inside the container, check where the app logs:

kubectl exec -it <pod-name> -n <namespace> -- sh
# then inspect config / log paths

If the app writes to files like /var/log/app.log, those won’t show up in kubectl logs unless:

  • you mount and ship them with a sidecar/agent, or
  • the app is configured to log to stdout/stderr.

Common causes

App logs to a file instead of stdout/stderr

Fix: configure the app to log to console.

Examples:

  • Java: log to console appender
  • Node.js: use console transport
  • Python: use StreamHandler to stdout
  • Nginx/Apache: redirect access/error logs to stdout/stderr

Container restarted and logs rotated away

Kubernetes only keeps current and previous container logs locally, and node log rotation may remove older logs.

Check:

kubectl describe pod <pod-name> -n <namespace>

Look for restart count and termination reason.

Log collection agent issue

If you use Fluent Bit / Fluentd / Vector / Loki / Elasticsearch / Datadog / etc.:

  • agent may be down
  • filters may exclude namespace/pod labels
  • log shipper may not have permissions
  • log pipeline may be backpressured

Check agent pods:

kubectl get pods -A | egrep 'fluent|vector|loki|promtail|datadog'
kubectl logs -n <logging-namespace> <agent-pod>

Node-level log issues

Container logs live on the node under paths like:

  • /var/log/containers/
  • /var/log/pods/
  • runtime-specific paths under /var/lib/containerd/ or /var/lib/docker/

Problems can happen if:

  • node disk is full
  • kubelet cannot write logs
  • log rotation removed them
  • node was replaced or drained

Check node status:

kubectl describe node <node-name>

Look for:

  • DiskPressure
  • MemoryPressure
  • eviction messages

Wrong container or namespace

In multi-container pods, kubectl logs may show the wrong container if not specified.

kubectl logs <pod-name> -n <namespace> -c <container-name>

Sidecar / init container confusion

Logs from init containers are not in the main container logs unless queried specifically:

kubectl logs <pod-name> -n <namespace> -c <init-container-name>

If logs are missing from your central logging system but kubectl logs works

Then the issue is in the log shipping pipeline, not Kubernetes itself.

Check:

  1. Does kubectl logs show logs?
  2. Does the node have /var/log/containers/*.log entries?
  3. Is the collector reading the right files?
  4. Are labels/filters dropping logs?
  5. Are timestamps malformed?
  6. Is multiline parsing failing?
  7. Is the destination backend accepting data?

Recommended setup

  • Log to stdout/stderr
  • Use structured JSON logs
  • Include timestamps, severity, pod, container, and trace IDs
  • Use a DaemonSet log collector
  • Ensure rotation and retention are configured
  • Monitor node disk usage and collector health

Useful commands

kubectl get events -n <namespace> --sort-by=.lastTimestamp
kubectl describe pod <pod-name> -n <namespace>
kubectl logs <pod-name> -n <namespace> --timestamps
kubectl logs <pod-name> -n <namespace> --previous --timestamps

If you want, I can help you troubleshoot this step-by-step. If you share:

  • kubectl describe pod ...
  • kubectl logs ...
  • whether you use Fluent Bit/Fluentd/Loki/Datadog/etc.

I can narrow down the exact cause.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.