Ship log files from your Kubernetes v1.2 to 1.8 cluster. For 1.9+, please use LogDNA Agent v2 for Kubernetes. 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-k8s-v1.8.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.
In order to keep in compliance with Kubernetes production environment standards, all Kubernetes logs should be logged to STDOUT (Standard out) by default. If you are logging to a file, make sure you are also logging to STDOUT as well. Not logging to STDOUT inhibits Kubernetes nodes from dumping logs onto the host machine, which is where LogDNA reads from. Doing this can result in the inability to get logs from your Kubernetes deployment out and into LogDNA for viewing.
Updated 6 months ago