k8s-log-investigation

Investigate Kubernetes pod log streams for failure signals with progressive context expansion.

Updated May 19, 2026
One-click install
npx skills add https://github.com/blouargant/yoke-registry --skill k8s-log-investigation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: k8s-log-investigation
Source: https://github.com/blouargant/yoke-registry/tree/main/skills/DevOps/k8s-log-investigation
Command: npx skills add https://github.com/blouargant/yoke-registry --skill k8s-log-investigation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you diagnose failing or unstable Kubernetes pods by quickly locating the most relevant error signals in very large log streams without dumping everything.

Core Features & Use Cases

  • Token-efficient triage: searches for high-signal anchor patterns (errors, warnings, panics, timeouts, crash loop indicators) before retrieving broader context.
  • Progressive widening: expands small surrounding context around each anchor, then gradually increases scope only as needed.
  • Lifecycle correlation: checks previous container logs to connect failures with restart/crash behavior and improve root-cause confidence.
  • Safe reporting: summarizes findings succinctly and avoids leaking secrets by redacting sensitive tokens; ends with an explicit result status line.

Use this when investigating pod crashes, CrashLoopBackOff, connection/timeouts, OOMKilled events, or when users ask to diagnose Kubernetes pod logs but the logs are too large to fetch in full.

Quick Start

Use the k8s-log-investigation skill to investigate the failing pod logs for the last 10 minutes in namespace <ns> and report the most likely root-cause category.

Frequently Asked Questions about k8s-log-investigation

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

FAQPage Schema
How do I investigate Kubernetes pod logs that are too large to retrieve in full?

Kubernetes pod log investigation can be done token-efficiently by searching for high-signal anchor patterns like errors, warnings, and crash loop indicators before expanding context, rather than dumping everything upfront.

What is the best way to find the root cause of a CrashLoopBackOff in Kubernetes?

To find the root cause of a CrashLoopBackOff, use a progressive widening approach that searches pod logs for anchor patterns, then checks previous container logs to correlate failures with restart behavior and improve root-cause confidence.

How does progressive context expansion work when debugging Kubernetes pod crashes?

Progressive context expansion works by first locating small surrounding context around each error or warning anchor in pod logs, then gradually increasing the retrieval scope only as needed to identify the failure signal.

Can I diagnose OOMKilled or timeout events in Kubernetes without fetching all pod logs?

Yes, you can diagnose OOMKilled, timeout, and crash loop events by applying an anchor-first search workflow that targets specific failure signals in the log stream, avoiding the need to fetch all pod logs.

How are sensitive tokens handled when reporting Kubernetes log investigation results?

When reporting Kubernetes log investigation results, sensitive tokens are automatically redacted to prevent leaking secrets, and findings are summarized succinctly with an explicit deterministic result status line.

When should I use an anchor-first search workflow for Kubernetes pod log triage?

Use an anchor-first search workflow for Kubernetes pod log triage when dealing with very large log streams, time-bounded debugging sessions, crash loops, or suspected missing permissions to quickly locate actionable failure signals.