Zalando cluster will ship logs to Scalyr for all containers running on a cluster node. The logs will include extra attributes/tags/metadata depending on deployment manifests. Whenever a new container starts on a cluster node, its logs will be shipped.
You need to make sure the minimum requirements are satisfied to start viewing logs on Scalyr.
Always make sure your application logs to
stderr. This will allow cluster log shipper to follow application logs, and also allows you to follow logs via Kubernetes native
$ zkubectl logs -f my-pod-name my-container-name
In order for the container logs to be shipped, your deployment must include the follwoing metadata labels:
All logs are shipped with extra attributes that can help in filtering from Scalyr UI (or API). Usually those extra fields are extracted from deployment labels, or the Kubernetes cluster/API.
- Application ID. Retrieved from metadata labels.
- Application version. Retrieved from metadata labels.
- Application release. Retrieved from metadata labels. [optional]
- Cluster ID. Retrieved from Kubernetes cluster.
- Container name. Retrieved from Kubernetes API.
- Cluster node running this container. Retrieved from Kubernetes cluster.
- Pod name running the container. Retrieved from Kubernetes cluster.
- Namespace running this deployment(pod). Retrieved from Kubernetes cluster.