Rancher can integrate with a variety of popular logging services and tools that exist outside of your Kubernetes clusters.
Rancher supports the following services:
Docker daemon should be configured with the (default) log-driver:
json-file. You can check the log-driver by running the following command:
$ docker info | grep 'Logging Driver' Logging Driver: json-file
Setting up a logging service to collect logs from your cluster/project is helpful several ways:
- Logs errors and warnings in your Kubernetes infrastructure to a stream. The stream informs you of events like a container crashing, a pod eviction, or a node dying.
- Allows you to capture and analyze the state of your cluster and look for trends in your environment using the log stream.
- Helps you when troubleshooting or debugging.
- Saves your logs to a safe location outside of your cluster, so that you can still access them even if your cluster encounters issues.
You can configure logging at either cluster or project level.
Note: You can only configure one logging service per cluster or project.
If you’re a cluster owner or member who works in operations or security, configure cluster logging.
Cluster logging writes logs for every pod in the cluster and, in RKE clusters, Kubernetes system components. Logs from the following locations are sent to your logging service:
/var/log/containerspath for pod logging.
/var/lib/rancher/rke/logs/path for Kubernetes system components.
If you’re a project owner or member who works on an application, configure project logging.
Project logging writes logs for every pod in the project (
After collection, all logs are stored by your logging service. Log into your service to view them.