Google Kubernetes Engine (GKE) integrates with Google Cloud observability services to help you to understand the health of your applications and maintain application availability and reliability.
When you create a GKE cluster running on Google Cloud, then Cloud Logging, Cloud Monitoring and Google Cloud Managed Service for Prometheus are enabled by default and provide observability specifically tailored for Kubernetes.
- Use the built-in dashboards to view default metrics and logs, and to set up recommended alerts.
- Enable additional observability packages to monitor Kubernetes components and objects and use collected data for debugging and troubleshooting.
- Configure data collection for third-party applications running on your clusters.
- Define your own metrics, dashboards, and alerts to meet your needs.
In addition to the integration with Cloud Logging and Cloud Monitoring, GKE also provides other features to help you observe and maintain the health of your applications.
Default observability features
By default, GKE Standard and Autopilot clusters are configured to do the following:
- Send system logs, audit logs, and application logs to Cloud Logging.
- Send system metrics to Cloud Monitoring.
- Use Google Cloud Managed Service for Prometheus to collect configured third-party and user-defined metrics and then send them to Cloud Monitoring. Google Cloud Managed Service for Prometheus lets you monitor and alert on your workloads using Prometheus, without manually managing and operating Prometheus at scale.
Customize and enhance data collection
You can control which logs and which metrics, if any, are sent from your GKE cluster to Cloud Logging and Cloud Monitoring. You can also control whether to enable Google Cloud Managed Service for Prometheus. See Configuring logging and monitoring for GKE for configuration instructions.
Additional observability metrics
You can collect additional observability metrics by enabling one or more observability metrics packages:
- Control plane metrics - Monitor health of Kubernetes components by collecting metrics for the Kubernetes API server, Scheduler, and Controller Manager. These metrics are useful signals of service health for defining service level objectives (SLOs).
- Kube state metrics - Monitor the health of Kubernetes objects such as deployments, nodes, and pods.
Third-party and user-defined metrics
To monitor third-party applications running on your clusters such as Postgres, MongoDB, and Redis, use Prometheus exporters with Google Cloud Managed Service for Prometheus. Cloud Monitoring provides pre-configured dashboards and alert policies for many exporters.
You can also write custom exporters to monitor other signals of health and performance that you are interested in.
Use collected data
Use the data you collect to analyze application health, debug, troubleshoot, and test as you develop, deploy, and maintain your applications.
GKE provides built-in observability features to get you started quickly:
View collected data for your clusters and workloads on in GKE observability dashboards. You can customize the provided dashboards.
- View key cluster metrics, such as CPU utilization, memory utilization, and the number of open incidents.
- View clusters by their infrastructure, workloads, or services.
- Inspect namespaces, nodes, workloads, services, pods, and containers.
- For pods and containers, view metrics as a function of time and view log entries.
From the Observability tab, you can create recommended alert policies so that you are notified about issues. To learn more about alerting, see the Alerting overview.
Create SLOs to monitor your service performance goals using collected GKE metrics.
Review GKE audit logs that record administrative activities and accesses as part of Cloud Audit Logs. Audit log policy determines which events are recorded and whether a log entry belongs to an Admin Activity log or a Data Access log.
GKE integrates with other Google Cloud services to help you monitor and manage your clusters and workloads.
Use the security posture dashboard to identify security concerns based on our standards and industry best practices.
View insights and recommendations to optimize your clusters.
Pricing for integration with Cloud Logging (including Cloud Audit Logs), Cloud Monitoring, and Google Cloud Managed Service for Prometheus is based on the amount of logs and metrics collected. See the Pricing page for details.
Features provided by other Google Cloud services listed in Other features have separate pricing. See the Pricing section of those documentation pages for more information.
Configure logging and monitoring in new and existing clusters.
Observe your clusters. Learn how to view dashboards, organize cluster information, and view alerting details.
Enable verbose, OS-level audit logging on GKE cluster nodes and how to export logs to Cloud Logging.