---
name: "stern-multi-pod-log-tailing"
description: "Tail and colorize logs from multiple Kubernetes pods and containers matching regular expressions."
metadata:
  author: "Stern"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "tail multiple pods stern"
  - "filter container logs regex stern"
  - "stern across all namespaces"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Stern Multi-Pod & Multi-Container Log Tailing

Streams container logs using Stern: regex pod name matching, container filtering (-c), timestamps, tailing across multiple namespaces (-A), excluding health checks, and JSON log parsing.

## When to Invoke
Invoke this skill whenever you need to:
- tail multiple pods stern
- filter container logs regex stern
- stern across all namespaces

## Execution SOP & Rules
1. Run stern with regex query: stern 'order-service-.*' --since 15m.
2. Exclude noise with invert regex: stern api -E 'healthz|metrics'.
3. Filter by specific container: stern backend -c app-container.
4. Format output with JSON parsing or custom template flags for easy scanning.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
