k8s-logs

Retrieve Kubernetes pod logs with stern and kubectl.

2|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/jimweller/davit-dataops-dotfiles --skill k8s-logs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: k8s-logs
Source: https://github.com/jimweller/davit-dataops-dotfiles/tree/main/dataops-plugin/skills/k8s-logs
Command: npx skills add https://github.com/jimweller/davit-dataops-dotfiles --skill k8s-logs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill simplifies the process of retrieving logs from Kubernetes pods across different clusters, making debugging and monitoring more efficient.

Core Features & Use Cases

  • Multi-cluster Support: Connects to and fetches logs from various Kubernetes clusters (EKS, AKS).
  • Targeted Log Retrieval: Allows filtering logs by cluster, namespace, and pod query patterns.
  • Log Options: Supports filtering logs by time (--since), number of lines (--tail), container name, and includes options for timestamps and previous log instances.
  • Use Case: Quickly find error messages in a specific application pod across multiple development environments.

Quick Start

Fetch the last 5 minutes of logs for pods matching 'api-*' in the 'default' namespace of the 'mathom-primary-cluster'.

Frequently Asked Questions about k8s-logs

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

FAQPage Schema
How do I fetch Kubernetes pod logs across multiple clusters?

To fetch Kubernetes pod logs across multiple clusters, you can use this Skill to connect to specific clusters like EKS or AKS and retrieve logs using the stern CLI. It supports explicit cluster selection, namespace targeting, and pod query patterns for efficient retrieval.

Can I filter Kubernetes pod logs by time, container, or instance?

Yes, you can filter Kubernetes pod logs using time constraints with `--since`, limit lines with `--tail`, specify container names, and include timestamps. The Skill also supports retrieving previous log instances for debugging crashed pods.

Do I need kubectl and stern installed to retrieve Kubernetes logs?

Yes, you need both the `stern` and `kubectl` CLIs installed and configured with cluster access to retrieve Kubernetes logs. The Skill relies on these command-line tools to connect to clusters and fetch the targeted log data.

What is the best way to get logs from pods matching a specific pattern?

The best way to get logs from pods matching a pattern is using the stern CLI through this Skill. You can target pods using query patterns like 'api-*' within a specific namespace and cluster, applying filters for time or container to narrow results.

Does this Kubernetes log retrieval tool work with EKS and AKS clusters?

Yes, this Kubernetes log retrieval tool works with EKS and AKS clusters. It provides multi-cluster support, allowing you to connect to and fetch logs from various Kubernetes environments by explicitly selecting the target cluster.