k8s

Diagnose Kubernetes pod and deployment failures and apply minimal kubectl changes.

12|2|Updated May 19, 2026
One-click install
npx skills add https://github.com/har-ki/claude-code-sre-handbook --skill k8s-har-ki
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: k8s
Source: https://github.com/har-ki/claude-code-sre-handbook/tree/main/skills/k8s
Command: npx skills add https://github.com/har-ki/claude-code-sre-handbook --skill k8s-har-ki

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you diagnose and fix broken Kubernetes workloads using kubectl while minimizing risk to immutable identity fields.

Core Features & Use Cases

  • Safe, minimal intervention fixes: Preserves immutable fields (names, selectors, container names) and applies targeted updates via kubectl patch/kubectl set.
  • Grounded investigation workflow: Extracts exact resource names, labels, selectors, and images from cluster output before executing changes.
  • Code-aligned remediation: If a repo/branch is provided, it clones and reads deployment/config and the Dockerfile to ensure the kubectl change matches developer intent.
  • Verification-first loop: Re-validates with kubectl outputs (pod readiness and logs) after each change to confirm success.

Quick Start

When your service is failing in Kubernetes, ask the AI to use the k8s skill to diagnose the deployment and apply the smallest kubectl patch needed to restore stable running pods.

Frequently Asked Questions about k8s

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

FAQPage Schema
How do I fix a Kubernetes pod stuck in CrashLoopBackOff?

Fix a Kubernetes CrashLoopBackOff by extracting the exact pod state and logs, then applying a targeted kubectl patch to the deployment to resolve the underlying misconfiguration.

How do I safely patch a Kubernetes deployment without breaking immutable fields?

Safely patch a Kubernetes deployment by preserving immutable identity fields like names, selectors, and container names, and applying targeted updates using kubectl patch or kubectl set commands.

Why does my Kubernetes deployment fail after a configuration change?

A Kubernetes deployment may fail after a configuration change due to misaligned values in the Dockerfile or repository code, requiring extraction of exact labels and selectors from cluster output to verify intent.

Can I use kubectl to troubleshoot Kubernetes RBAC and NetworkPolicy issues?

Yes, you can use kubectl to troubleshoot Kubernetes RBAC and NetworkPolicy issues by diagnosing namespace and network policy states, then applying minimal targeted changes to restore access.

What is the best way to verify a Kubernetes workload fix after applying a patch?

The best way to verify a Kubernetes workload fix is to re-validate using kubectl outputs, checking pod readiness and logs after each change to confirm the deployment is running stably.

Does troubleshooting Kubernetes StatefulSets require different handling than deployments?

Troubleshooting Kubernetes StatefulSets follows the same safe patching workflow as deployments, preserving immutable identity fields while diagnosing pod state and applying minimal kubectl changes to restore stability.