K8s Troubleshooterのロゴ

K8s Troubleshooter

コミュニティ
ahmedasmar
k8s-troubleshooter

Systematic Kubernetes troubleshooting and incident response. Use this skill whenever the user mentions Kubernetes, K8s, kubectl, pods, containers, or clusters. Triggers include diagnosing CrashLoopBackOff, ImagePullBackOff, OOMKilled, or Pending pods, responding to production incidents, troubleshooting node NotReady or DiskPressure, debugging service connectivity or networking, investigating PVC or storage failures, analyzing performance degradation, checking cluster health, troubleshooting Helm releases, and conducting post-incident reviews.

概要

公開者ahmedasmar
リポジトリdevops-claude-skills
スキル名k8s-troubleshooter
スター
203
フォーク
38
同梱ファイル
5
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 5個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    ahmedasmarがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「K8s Troubleshooter」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/ahmedasmar/devops-claude-skills/tree/main/k8s-troubleshooter/skills
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ahmedasmar/devops-claude-skills.git /tmp/devops-claude-skills
mkdir -p .claude/skills
cp -r /tmp/devops-claude-skills/k8s-troubleshooter/skills .claude/skills/k8s-troubleshooter
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでK8s Troubleshooterを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にK8s Troubleshooterを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、K8s Troubleshooterは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Kubernetes Troubleshooter & Incident Response

Systematic approach to diagnosing and resolving Kubernetes issues in production environments.

Core Troubleshooting Workflow

Follow this systematic approach for any Kubernetes issue:

1. Gather Context

  • What is the observed symptom?
  • When did it start?
  • What changed recently (deployments, config, infrastructure)?
  • What is the scope (single pod, service, node, cluster)?
  • What is the business impact (severity level)?

2. Initial Triage

Run cluster health check:

bash
# Check node status and health
kubectl get nodes

# Find non-running pods across all namespaces
kubectl get pods -A --field-selector status.phase!=Running

# Check node resource usage
kubectl top nodes

This provides an overview of:

  • Node health status
  • Pending and failed pods across all namespaces
  • Node resource utilization

3. Deep Dive Investigation

Based on triage results, focus investigation:

For Namespace-Level Issues:

bash
python3 scripts/check_namespace.py <namespace>

This provides comprehensive namespace health:

  • Pod status (running, pending, failed, crashlooping)
  • Service health and endpoints
  • Deployment availability
  • PVC status
  • Resource quota usage
  • Recent events
  • Actionable recommendations

For Pod Issues:

bash
# Get full pod details (status, events, conditions, resource config)
kubectl describe pod <pod-name> -n <namespace>

# Check current and previous container logs
kubectl logs <pod-name> -n <namespace>
kubectl logs <pod-name> -n <namespace> --previous

# Get events specific to the pod
kubectl get events -n <namespace> --field-selector involvedObject.name=<pod-name>

This reveals:

  • Pod phase and readiness
  • Container statuses and states
  • Restart counts and exit codes
  • Recent events and scheduling decisions
  • Resource requests and limits

For additional investigations:

  • Check all namespace events: kubectl get events -n <namespace> --sort-by='.lastTimestamp'

4. Identify Root Cause

Consult references/common_issues.md for detailed information on:

  • ImagePullBackOff / ErrImagePull
  • CrashLoopBackOff
  • Pending Pods
  • OOMKilled
  • Node issues (NotReady, DiskPressure)
  • Networking failures
  • Storage/PVC issues
  • Resource quotas and throttling
  • RBAC permission errors

Each issue includes:

  • Symptoms
  • Common causes
  • Diagnostic commands
  • Remediation steps
  • Prevention strategies

5. Apply Remediation

Follow remediation steps from common_issues.md based on root cause identified.

Always:

  • Test fixes in non-production first if possible
  • Document actions taken
  • Monitor for effectiveness
  • Have rollback plan ready

6. Verify & Monitor

After applying fix:

  • Verify issue is resolved
  • Monitor for recurrence (15-30 minutes minimum)
  • Check related systems
  • Update documentation

Incident Response

For production incidents, follow structured response in references/incident_response.md:

Severity Assessment:

  • SEV-1 (Critical): Complete outage, data loss, security breach
  • SEV-2 (High): Major degradation, significant user impact
  • SEV-3 (Medium): Minor impairment, workaround available
  • SEV-4 (Low): Cosmetic, minimal impact

Incident Phases:

  1. Detection - Identify and assess
  2. Triage - Determine scope and impact
  3. Investigation - Find root cause
  4. Resolution - Apply fix
  5. Post-Incident - Document and improve

Common Incident Scenarios:

  • Complete cluster outage
  • Service degradation
  • Node failure
  • Storage issues
  • Security incidents

See references/incident_response.md for detailed playbooks.

Quick Reference Commands

Cluster Overview

bash
kubectl cluster-info
kubectl get nodes
kubectl get pods --all-namespaces | grep -v Running
kubectl get events --all-namespaces --sort-by='.lastTimestamp' | tail -20

Pod Diagnostics

bash
kubectl describe pod <pod> -n <namespace>
kubectl logs <pod> -n <namespace>
kubectl logs <pod> -n <namespace> --previous
kubectl exec -it <pod> -n <namespace> -- /bin/sh
kubectl get pod <pod> -n <namespace> -o yaml

Node Diagnostics

bash
kubectl describe node <node>
kubectl top nodes
kubectl top pods --all-namespaces
ssh <node> "systemctl status kubelet"
ssh <node> "journalctl -u kubelet -n 100"

Service & Network

bash
kubectl describe svc <service> -n <namespace>
kubectl get endpoints <service> -n <namespace>
kubectl get networkpolicies --all-namespaces

Storage

bash
kubectl get pvc,pv --all-namespaces
kubectl describe pvc <pvc> -n <namespace>
kubectl get storageclass

Resource & Configuration

bash
kubectl describe resourcequota -n <namespace>
kubectl describe limitrange -n <namespace>
kubectl get rolebindings,clusterrolebindings -n <namespace>

Diagnostic Scripts

check_namespace.py

Namespace-level health check and diagnostics:

  • Pod health (running, pending, failed, crashlooping, image pull errors)
  • Service health and endpoints
  • Deployment availability status
  • PersistentVolumeClaim status
  • Resource quota usage and limits
  • Recent namespace events
  • Health status assessment
  • Actionable recommendations

Usage:

bash
# Human-readable output
python3 scripts/check_namespace.py <namespace>

# JSON output for automation
python3 scripts/check_namespace.py <namespace> --json

# Include more events
python3 scripts/check_namespace.py <namespace> --events 20

Best used when troubleshooting issues in a specific namespace or assessing overall namespace health.

Cluster-Level Diagnostics (kubectl)

For cluster-wide health checks, use kubectl directly:

bash
# Node health and status
kubectl get nodes
kubectl top nodes

# Find non-running pods across all namespaces
kubectl get pods -A --field-selector status.phase!=Running

# System pod health
kubectl get pods -n kube-system

Pod-Level Diagnostics (kubectl)

For detailed pod investigation, use kubectl directly:

bash
# Full pod details (status, events, conditions, resource config)
kubectl describe pod <pod-name> -n <namespace>

# Current and previous container logs
kubectl logs <pod-name> -n <namespace>
kubectl logs <pod-name> -n <namespace> --previous

# Events specific to the pod
kubectl get events -n <namespace> --field-selector involvedObject.name=<pod-name>

Reference Documentation

references/common_issues.md

Comprehensive guide to common Kubernetes issues with:

  • Detailed symptom descriptions
  • Root cause analysis
  • Step-by-step diagnostic procedures
  • Remediation instructions
  • Prevention strategies

Covers:

  • Pod issues (ImagePullBackOff, CrashLoopBackOff, Pending, OOMKilled)
  • Node issues (NotReady, DiskPressure)
  • Networking issues (pod-to-pod communication, service access)
  • Storage issues (PVC pending, volume mount failures)
  • Resource issues (quota exceeded, CPU throttling)
  • Security issues (vulnerabilities, RBAC)

Read this when you identify a specific issue type but need detailed remediation steps.

references/incident_response.md

Structured incident response framework including:

  • Incident response phases (Detection → Triage → Investigation → Resolution → Post-Incident)
  • Severity level definitions
  • Detailed playbooks for common incident scenarios
  • Communication guidelines
  • Post-incident review template
  • Best practices for prevention, preparedness, response, and recovery

Read this when responding to production incidents or planning incident response procedures.

references/performance_troubleshooting.md

Comprehensive performance diagnosis and optimization guide covering:

  • High Latency Issues - API response time, request latency troubleshooting
  • CPU Performance - Throttling detection, profiling, optimization
  • Memory Performance - OOM issues, leak detection, heap profiling
  • Network Performance - Latency, packet loss, DNS resolution
  • Storage I/O Performance - Disk performance testing, optimization
  • Application-Level Metrics - Prometheus integration, distributed tracing
  • Cluster-Wide Performance - Control plane, scheduler, resource utilization

Read this when:

  • Investigating slow application response times
  • Diagnosing CPU or memory performance issues
  • Troubleshooting network latency or connectivity
  • Optimizing storage I/O performance
  • Setting up performance monitoring

references/helm_troubleshooting.md

Complete guide to Helm troubleshooting including:

  • Release Issues - Stuck releases, missing resources, state problems
  • Installation Failures - Chart conflicts, validation errors, template rendering
  • Upgrade and Rollback - Failed upgrades, immutable field errors, rollback procedures
  • Values and Configuration - Values not applied, parsing errors, secret handling
  • Chart Dependencies - Dependency updates, version conflicts, subchart values
  • Hooks and Lifecycle - Hook failures, cleanup issues
  • Repository Issues - Chart access problems, version mismatches

Read this when:

  • Working with Helm-deployed applications
  • Troubleshooting chart installations or upgrades
  • Debugging Helm release states
  • Managing chart dependencies

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「K8s Troubleshooter」では何ができますか?

Systematic Kubernetes troubleshooting and incident response. Use this skill whenever the user mentions Kubernetes, K8s, kubectl, pods, containers, or clusters. Triggers include diagnosing CrashLoopBackOff, ImagePullBackOff, OOMKilled, or Pending pods, responding to production incidents, troubleshooting node NotReady or DiskPressure, debugging service connectivity or networking, investigating PVC or storage failures, analyzing performance degradation, checking cluster health, troubleshooting Helm releases, and conducting post-incident reviews.

TypingMindでK8s Troubleshooterを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。K8s Troubleshooterはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにK8s Troubleshooterをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/ahmedasmar/devops-claude-skills/tree/main/k8s-troubleshooter/skillsを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

K8s Troubleshooterを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

K8s Troubleshooterで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもK8s Troubleshooterを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「K8s Troubleshooter」は無料ですか?

ahmedasmarがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇