Get startedGet started for free

Inspecting logs with Cloud Logging and Logging Agents

1. Inspecting logs with Cloud Logging and Logging Agents

Cloud Logging is a fully managed service that stores, searches, analyzes, monitors, and alerts on logging data and events from Google Cloud. It’s designed to automatically scale and ingest terabytes of log data per second. An event describes an operation that takes place in a cluster. Some examples include deleting a Pod, scaling a Deployment, or creating a container. Events are stored as API objects on the cluster control plan, and because events are only stored temporarily in Kubernetes, GKE deploys an event exported in the cluster control plane to capture events and push them into Cloud Logging. GKE integration with Cloud Logging is enabled by default, though it can be disabled on a cluster if required. Cloud Logging agents are preinstalled on nodes and pre-configured to export log data to Cloud Logging. Cloud Logging also offers an API that can be used to write a custom log and push it to Cloud Logging. Additionally, logs can be filtered by using Cloud filter language, either in the Logs Viewer console or directly through the Cloud Logging API. GKE installs a logging agent on every node of a cluster, and this agent collects and exports container logs and system component logs to the Cloud Logging backend. The node logging agent used by Cloud Logging is FluentBit. FluentBit is a log aggregator that can display logs, adding helpful metadata, and then continuously export those logs to Cloud Logging. FluentBit uses DaemonSet, as that ensures that every node in a cluster runs a copy of a specific Pod. The configuration of the FluentBit agent is managed through ConfigMaps. This increases the scalability of the implementation by separating the application (the FluentBit DaemonSet) from the configuration elements (the ConfigMap).

2. Let's practice!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.