gcloud-gke-logging

Query GKE container logs with gcloud logging read filters.

Updated Mar 2, 2019
One-click install
npx skills add https://github.com/trmaphi/dotfiles --skill gcloud-gke-logging
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gcloud-gke-logging
Source: https://github.com/trmaphi/dotfiles/tree/main/.claude/skills/gcloud-gke-logging
Command: npx skills add https://github.com/trmaphi/dotfiles --skill gcloud-gke-logging

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

GKE production clusters generate logs across containers and nodes. This skill helps you locate, filter, and analyze these logs in Cloud Logging to diagnose production issues and performance problems.

Core Features & Use Cases

  • Filter by cluster, namespace, pod, and time range to quickly pinpoint incidents.
  • Perform historical log analysis across multiple pods and nodes beyond the current lifecycle.
  • Facilitate production debugging with powerful queries and structured log views.

Quick Start

Request logs for a specified GKE cluster and time window using gcloud logging read and review the results for issues.

Frequently Asked Questions about gcloud-gke-logging

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

FAQPage Schema
How do I filter GKE container logs in Cloud Logging by namespace and pod?

Filter GKE container logs in Cloud Logging by executing gcloud logging read queries with resource.type=gke_container, specifying cluster_name, namespace_name, and pod_name to pinpoint incidents within your production clusters.

What is the best way to debug production issues in GKE using historical logs?

Debug production issues using historical log analysis by building gcloud logging read queries with precise timestamps. This extracts relevant container logs across multiple pods and nodes beyond their current lifecycle for multi-pod visibility.

Can I search for log incidents across multiple GKE pods and namespaces simultaneously?

Search for log incidents across multiple GKE pods and namespaces simultaneously by constructing cross-resource gcloud logging read queries. This provides multi-pod visibility by applying filters like cluster_name and namespace_name to your Cloud Logging data.

Does this approach require building specific queries to locate GKE cluster logs?

Yes, locating GKE cluster logs requires building and executing precise gcloud logging read queries. You must filter by resource.type=gke_container, cluster_name, namespace_name, pod_name, and suitable timestamps to extract the relevant data.

Why are my gcloud logging read queries not returning GKE container logs?

Your gcloud logging read queries may not return GKE container logs if the resource.type is not set to gke_container. Ensure you include correct cluster_name, namespace_name, pod_name filters, and suitable timestamps to successfully extract relevant container logs.