gke-observability

Configures GKE Cloud Logging, Cloud Monitoring, and managed Prometheus metrics collection.

Updated May 11, 2026
One-click install
npx skills add https://github.com/alon3153/upe-social-publisher --skill gke-observability-alon3153
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gke-observability
Source: https://github.com/alon3153/upe-social-publisher/tree/main/.agents/skills/gke-observability
Command: npx skills add https://github.com/alon3153/upe-social-publisher --skill gke-observability-alon3153

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? GKE clusters ship with minimal observability enabled by default, leaving teams blind to control-plane health, workload metrics, and audit trails until they manually configure logging and monitoring components. ## Core Features & Use Cases - Golden Path Monitoring Configuration: Enable the full monitoring suite including control-plane metrics (API server, scheduler, controller manager) via gcloud commands, with warnings about the replace-not-append flag behavior and per-sample billing. - Managed Prometheus & Alerting: Set up Google Managed Prometheus, query key GKE metrics with PromQL, and design alert thresholds for crash loops, node health, and API latency. - Log Querying with LQL: Query cluster, workload, and audit logs using gcloud logging read and Logging Query Language patterns for troubleshooting OOMKills and scheduling failures. - Use Case: A platform engineer notices missing API server metrics on a new cluster and uses this Skill to enable the full monitoring component list, deploy kube-state-metrics, and build a Cloud Monitoring dashboard. ## Quick Start Ask the assistant to enable full GKE monitoring and managed Prometheus on your cluster, including control-plane metrics and cost considerations.

Frequently Asked Questions about gke-observability

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enable control-plane metrics on a GKE cluster?▼

Run gcloud container clusters update with --monitoring=SYSTEM,API_SERVER,SCHEDULER,CONTROLLER_MANAGER plus any workload components. Control-plane metrics are off by default and the flag replaces the previous setting entirely, so always pass the full desired list.

How to query GKE cluster logs with gcloud?▼

Use gcloud logging read with a filter like resource.type="k8s_cluster" and resource.labels.cluster_name to fetch system logs. For workload logs, filter on resource.type="k8s_container" with the namespace label, and use logName:"cloudaudit.googleapis.com" for audit logs.

Why are there no API server metrics on my new GKE cluster?▼

API server, scheduler, and controller manager metrics are not enabled by default; only SYSTEM components are. You must explicitly enable them via the --monitoring flag, and note that these metrics bill per sample ingested through Managed Service for Prometheus.

Does GKE collect kube-state-metrics by default?▼

No, GKE does not collect kube-state-metrics by default. Metrics like kube_pod_status_phase and kube_pod_container_status_restarts_total require deploying the Managed Prometheus kube-state-metrics package first.

What is the difference between gcloud monitoring flags and the monitoringConfig API enum?▼

The gcloud flag uses spellings like SYSTEM and API_SERVER, while the monitoringConfig API uses SYSTEM_COMPONENTS and APISERVER. Mixing the two fails the command, which is a common and confusing error.

How can I reduce GKE monitoring costs in non-production clusters?▼

Update the cluster with --monitoring=SYSTEM to collect only system metrics. Cloud Logging charges per GiB ingested beyond the 50 GiB free tier, and Managed Prometheus charges per samples ingested, so limiting components lowers cost.