k8s-query
Query Kubernetes resources (pods, deployments, services, events).
Skill by eveld
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/eveld-k8s-query
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: devops
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/k8s-query
What's inside
- Skill name
k8s-query- Description
- Query Kubernetes resources (pods, deployments, services, events). Use when checking cluster state and resource status.
- License
- MIT
- Instructions
- 124 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- COMMANDS.md · references/
SKILL.md (first lines)
# Query Kubernetes Resources
Check status of Kubernetes pods, deployments, services, and events.
## When to Use
- Checking if pods are running
- Viewing pod/deployment status
- Investigating pod failures or restarts
- Checking resource events and logs
## Pre-flight Checks
### Authentication and Context
```bash
# Check kubectl context
kubectl config current-context || {
echo "No kubectl context. Run: kubectl config use-context <context>"
exit 1
}
# Show current context and namespace
CURRENT_CONTEXT=$(kubectl config current-context)
CURRENT_NAMESPACE=$(kubectl config view --minify -o jsonpath='{..namespace}' || echo 'default')
echo "K8s Context: $CURRENT_CONTEXT"
echo "Namespace: $CURRENT_NAMESPACE"
# If context suggests different environment, prompt to switch
# Example: User mentions "production namespace" but current context is "staging-cluster"
# Detect from query context and prompt:
# echo "Query mentions 'production' but current context is '$CURRENT_CONTEXT'"
# echo "Switch to production context? Run: kubectl config use-context prod-cluster"
# read -p "Continue with current context? (y/n) " -n 1 -r
```
## Query Strategy
Follow this approach for effective Kubernetes debugging:
1. **Check pod status first**: `kubectl get pods -n <namespace>`
2. **Check events if pod failing**: `kubectl describe pod <pod-name> -n <namespace>` (events at bottom)
3. **Check logs if pod running**: `kubectl logs <pod-name> -n <namespace>`
4. **Check previous logs if crashed**: `kubectl logs <pod-name> --previous -n <namespace>`
5. **Correlate with GCP logs**: Save K8s events/logs to /tmp, check GCP for service logs
### Example Workflow
```bash
# Step 1: Check pod status
kubectl get pods -n production -l app=api-gateway
# Step 2: If pod is failing, describe for events
kubectl describe pod api-gateway-abc123 -n production
# Look at Events section at bottom for errors
# Step 3: If pod running but misbehaving, check logs
kubectl logs api-gateway-abc123 -n production --tail=200
# Step 4: If pod crashed/restarted, check previous logs
kubectl logs api-gateway-abc123 --previous -n production
# Step 5: Check namespace events for broader context
kubectl get events -n production --sort-by='.lastTimestamp' | tail -20
```
## Output Management
For large outputs or correlation with other tools, save to tmp file:
```bash
# Save pod list to tmp file
kubectl get pods -n production -o json > /tmp/k8s-pods-$(date +%Y%m%d-%H%M%S).json
# Save logs for offline analysis
kubectl logs api-gateway-xyz -n production --tail=1000 > /tmp/api-gateway-logs-$(date +%Y%m%d-%H%M%S).log
# Save events for correlation
kubectl get events -n production --sort-by='.lastTimestamp' > /tmp/k8s-events-$(date +%Y%m%d-%H%M%S).txt
# Then analyze or correlate with GCP logs
grep -i error /tmp/api-gateway-logs-*.log
```
**Benefits**:
- Correlate Kubernetes events with GCP logs using timestamps
- Share debugging context with team
- Preserve state for investigation
## Common Patterns
For detailed command reference, see:
- [kubectl command patterns](references/COMMANDS.md) - Get, describe, logs, events, metrics
### Quick Reference
```bash
# Get pods in namespace
kubectl get pods -n <namespace>
# Describe pod (includes events)
kubectl describe pod <pod-name> -n <namespace>
# Get pod logs
kubectl logs <pod-name> -n <namespace> --tail=200
# Get previous logs (after crash)
kubectl logs <pod-name> --previous -n <namespace>
# Get events
kubectl get events -n <namespace> --sort-by='.lastTimestamp'
```
## Tips
- Use `-n <namespace>` for all commands or set default: `kubectl config set-context --current --namespace=<namespace>`
- Use `--all-namespaces` or `-A` to search across all namespaces
- Use `-l` for label selectors: `-l app=api,tier=frontend`
- Use `--field-selector` for field-based filtering (e.g., `status.phase=Failed`)
- Check pod events with describe before checking logs (events show scheduling/startup issues)From eveld/claude, MIT.
More from eveld/claude
- 0.480score
linear-issues
eveld
Fetch and view Linear issues/tickets.
SkillDFreshness: D★ 10Claude Code +9 - 0.479score
gcp-logs
eveld
Query GCP Cloud Logging for errors, service logs, and request traces.
SkillDFreshness: D★ 10Claude Code +9 - 0.475score
k8s-debug
eveld
Launch ephemeral debug container in running pod for interactive debugging.
SkillDFreshness: D★ 10Claude Code +9 - 0.474score
spawn-planning-agents
eveld
Use when creating implementation plans to research codebase patterns and gather context for planning.
SkillDFreshness: D★ 10Claude Code +9 - 0.474score
follow-test-patterns
eveld
Use when writing tests to ensure they follow project conventions.
SkillDFreshness: D★ 10Claude Code +9 - 0.474score
spawn-research-agents
eveld
Use when conducting codebase research to orchestrate specialized agents in parallel for comprehensive investigation.
SkillDFreshness: D★ 10Claude Code +9 - 0.474score
gather-project-metadata
eveld
Use when creating research or plan documents to gather git commit, branch, repository info.
SkillDFreshness: D★ 10Claude Code +9 - 0.474score
debug-systematically
eveld
Use when encountering errors or bugs to follow a systematic debugging process instead of jumping to conclusions.
SkillDFreshness: D★ 10Claude Code +9 - 0.472score
before-code-analysis
eveld
Use BEFORE reading multiple files to understand code.
SkillDFreshness: D★ 10Claude Code +9 - 0.472score
linear-update
eveld
Update Linear issues with debugging findings.
SkillDFreshness: D★ 10Claude Code +9 - 0.472score
agent-awareness
eveld
ALWAYS check this skill before using grep, glob, Task tool, or doing any codebase exploration.
SkillDFreshness: D★ 10Claude Code +9 - 0.472score
linear-awareness
eveld
ALWAYS check before working with Linear issues.
SkillDFreshness: D★ 10Claude Code +9
Signals
- Stars
- 10
- Forks
- 2
- Open issues
- 0
- Last commit (this folder)
- Feb 4, 2026 (8 months ago)
- Last release
- Dec 29, 2025 (10 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/eveld/claude
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from eveld
- 0.480score
linear-issues
eveld
Fetch and view Linear issues/tickets.
SkillDFreshness: D★ 10Claude Code +9 - 0.479score
gcp-logs
eveld
Query GCP Cloud Logging for errors, service logs, and request traces.
SkillDFreshness: D★ 10Claude Code +9 - 0.475score
k8s-debug
eveld
Launch ephemeral debug container in running pod for interactive debugging.
SkillDFreshness: D★ 10Claude Code +9 - 0.474score
spawn-planning-agents
eveld
Use when creating implementation plans to research codebase patterns and gather context for planning.
SkillDFreshness: D★ 10Claude Code +9 - 0.474score
debug-systematically
eveld
Use when encountering errors or bugs to follow a systematic debugging process instead of jumping to conclusions.
SkillDFreshness: D★ 10Claude Code +9 - 0.474score
spawn-research-agents
eveld
Use when conducting codebase research to orchestrate specialized agents in parallel for comprehensive investigation.
SkillDFreshness: D★ 10Claude Code +9
Cite this page
k8s-query skill. Agent Mart. https://agentmart.dev/skills/eveld-k8s-query (last updated 2026-10-24)