本文へ移動
cccskills
無料GitHub で公開

k8s-incident

Respond to Kubernetes incidents with runbooks and diagnostics. Use for outages, pod failures, node issues, network problems, and emergency response.

インストール方法を見る

含まれるファイル(2)

  • SKILL.md4.9 KB
  • scripts/collect-diagnostics.py9.5 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Kubernetes Incident Response

Runbooks and diagnostic workflows for common Kubernetes incidents.

When to Apply

Use this skill when:

  • User mentions: "incident", "outage", "emergency", "down", "not working"
  • Operations: emergency response, production issues, service degradation
  • Keywords: "urgent", "broken", "fix", "restore", "recover"

Priority Rules

PriorityRuleImpactTools
1Check control plane firstCRITICALget_pods(namespace="kube-system")
2Assess node healthCRITICALget_nodes
3Gather events before changesHIGHget_events
4Document timelineHIGHManual notes
5Rollback if safeMEDIUMrollback_deployment

Quick Reference

IncidentFirst ToolNext Steps
Pod failureget_pod_logs(previous=True)describe_pod, get_events
Node downdescribe_nodeCheck kubelet logs
Service unreachableget_endpointsget_network_policies
Control planeget_pods(namespace="kube-system")Check API server logs

Incident Triage

Quick Health Check

get_nodes()
get_pods(namespace="kube-system")
get_events(namespace)

Severity Assessment

IndicatorSeverityAction
Multiple nodes NotReadyCriticalEscalate immediately
kube-system pods failingCriticalControl plane issue
Single pod CrashLoopMediumDebug pod
High latencyMediumCheck resources

Runbook: Pod Failures

CrashLoopBackOff

get_pod_logs(name, namespace, previous=True)
describe_pod(name, namespace)
get_events(namespace, field_selector="involvedObject.name=<pod>")
get_pod_metrics(name, namespace)

Common Causes:

  • OOMKilled → Increase memory limits
  • Exit code 1 → Application error in logs
  • Exit code 137 → Killed by OOM or SIGKILL
  • Exit code 143 → Graceful SIGTERM

ImagePullBackOff

describe_pod(name, namespace)
get_secrets(namespace)

Pending Pod

describe_pod(name, namespace)
get_nodes()
get_events(namespace)

Runbook: Node Issues

Node NotReady

describe_node(name)
get_events(namespace="", field_selector="involvedObject.name=<node>")
node_logs_tool(name, "kubelet")

Node DiskPressure

describe_node(name)
get_pods(field_selector="spec.nodeName=<node>")

Runbook: Network Issues

Service Not Accessible

get_services(namespace)
get_endpoints(namespace)
get_pods(namespace, label_selector="<service-selector>")
get_network_policies(namespace)

DNS Resolution Failures

get_pods(namespace="kube-system", label_selector="k8s-app=kube-dns")
get_pod_logs("coredns-xxx", "kube-system")

With Cilium

cilium_status_tool()
cilium_endpoints_list_tool(namespace)
hubble_flows_query_tool(namespace)

With Istio

istio_analyze_tool(namespace)
istio_proxy_status_tool()

Runbook: Storage Issues

PVC Pending

describe_pvc(name, namespace)
get_storage_classes()
get_events(namespace)

Pod Stuck in ContainerCreating

describe_pod(name, namespace)
get_pvc(namespace)
get_events(namespace)

Runbook: Control Plane Issues

API Server Unavailable

get_pods(namespace="kube-system", label_selector="component=kube-apiserver")
get_events(namespace="kube-system")

etcd Issues

get_pods(namespace="kube-system", label_selector="component=etcd")
get_pod_logs("etcd-xxx", "kube-system")

Emergency Actions

Force Delete Pod

delete_pod(name, namespace, grace_period=0, force=True)

Rollback Deployment

rollback_deployment(name, namespace, revision=0)

Helm Rollback

rollback_helm_release(name, namespace, revision=1)

Diagnostic Collection Script

For comprehensive incident diagnostics, see scripts/collect-diagnostics.py.

Multi-Cluster Incident Response

Check all clusters:

for context in ["prod-1", "prod-2", "staging"]:
    get_nodes(context=context)
    get_pods(namespace="kube-system", context=context)
    get_events(namespace="kube-system", context=context)

Post-Incident

Document Timeline

  1. When did the incident start?
  2. What was the impact?
  3. What was the root cause?
  4. What fixed it?

Prevent Recurrence

  • Add monitoring/alerting
  • Improve resource limits
  • Add readiness probes
  • Document runbook

Related Skills

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Configure Kubernetes autoscaling with HPA, VPA, and KEDA. Use for horizontal/vertical pod autoscaling, event-driven scaling, and capacity management.

日本語の概要は準備中です。原文の説明を表示しています。

rohitg00/kubectl-mcp-server9642026年4月9日 更新

Kubernetes backup and restore with Velero. Use when creating backups, restoring applications, managing disaster recovery, or migrating workloads between clusters.

日本語の概要は準備中です。原文の説明を表示しています。

rohitg00/kubectl-mcp-server9642026年4月9日 更新

Browser automation for Kubernetes dashboards and web UIs. Use when interacting with Kubernetes Dashboard, Grafana, ArgoCD UI, or other web interfaces. Requires MCP_BROWSER_ENABLED=true.

日本語の概要は準備中です。原文の説明を表示しています。

rohitg00/kubectl-mcp-server9642026年4月9日 更新

k8s-capi

無料

Cluster API lifecycle management for provisioning, scaling, and upgrading Kubernetes clusters. Use when managing cluster infrastructure or multi-cluster operations.

日本語の概要は準備中です。原文の説明を表示しています。

rohitg00/kubectl-mcp-server9642026年4月9日 更新

k8s-certs

無料

Kubernetes certificate management with cert-manager. Use when managing TLS certificates, configuring issuers, or troubleshooting certificate issues.

日本語の概要は準備中です。原文の説明を表示しています。

rohitg00/kubectl-mcp-server9642026年4月9日 更新

Cilium and Hubble network observability for Kubernetes. Use when managing network policies, observing traffic flows, or troubleshooting connectivity with eBPF-based networking.

日本語の概要は準備中です。原文の説明を表示しています。

rohitg00/kubectl-mcp-server9642026年4月9日 更新

rohitg00 のスキルをすべて見る

このスキルの問題を報告する