Kubernetes Logging

Get started with Kubernetes log files. Learn how to deploy, and collect, ingest, monitor, search, and analyze Kubernetes logs for simplified, centralized log management and analysis.


Ship log files from your Kubernetes v1.2+ cluster. To enable Kubernetes logging, run the following commands. Be sure to replace YOUR-INGESTION-KEY-HERE with your LogDNA Ingestion Key.

kubectl create secret generic logdna-agent-key --from-literal=logdna-agent-key=YOUR-INGESTION-KEY-HERE
kubectl create -f https://raw.githubusercontent.com/logdna/logdna-agent/master/logdna-agent-ds.yaml

This automatically installs a logdna-agent pod into each node in your cluster and ships stdout/stderr from all containers, both application logs and node logs. Note: By default, the agent pod will collect logs from all namespaces on each node, including kube-system. View your logs at app.logdna.com.


We extract pertinent Kubernetes metadata: pod name, container name, container id, namespace and display them inside the line context menu. You can search directly for logs matching these properties by clicking on them in the context menu or using our field search syntax:


Once logs are flowing into LogDNA, you'll also see a meta container simply named POD which shows container terminations. You can find under the Apps dropdown.