remediation

Executes Kubernetes pod restarts, deployment scaling, and rollbacks with mandatory dry-run validation.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/erwinv2k-TKG/AgentesVSC --skill remediation-erwinv2k-tkg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: remediation
Source: https://github.com/erwinv2k-TKG/AgentesVSC/tree/main/packs/incidentfox/sre-agent/.claude/skills/remediation
Command: npx skills add https://github.com/erwinv2k-TKG/AgentesVSC --skill remediation-erwinv2k-tkg

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires kubernetes, and includes scripts (resource) components.

What problem does it solve? When a Kubernetes incident occurs, engineers need to perform corrective actions like restarting pods, scaling deployments, or rolling back releases, but doing so manually under pressure risks mistakes and outages. This Skill enforces a safe, repeatable remediation workflow where every action is previewed with a dry run and confirmed before execution. ## Core Features & Use Cases - Pod Restart: Delete a pod so its managing ReplicaSet, DaemonSet, or StatefulSet recreates it, with warnings for standalone pods that will not be recreated. - Deployment Scaling: Scale a deployment up or down with guardrails such as a 50-replica cap and a required confirmation flag when scaling to zero. - Deployment Rollback: Roll back to a previous or specific revision using revision history and kubectl rollout undo. - Use Case: A payment service is stuck in CrashLoopBackOff after a bad image push. Diagnose the issue, dry-run a rollback to see the target revision and image, get confirmation, then execute the rollback and verify recovery. ## Quick Start Ask the agent to dry-run a rollback of the payment deployment in the otel-demo namespace and then execute it after confirmation.

Frequently Asked Questions about remediation

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

FAQPage Schema
How do I restart a Kubernetes pod safely with kubectl or Python?

Restart a pod by deleting it so its managing ReplicaSet, DaemonSet, or StatefulSet recreates it automatically. Run restart_pod.py with --dry-run first to preview the action, and note that standalone pods without an owner will not be recreated.

How do I rollback a Kubernetes deployment to a previous revision?

Use rollback_deployment.py with the deployment name and namespace to view revision history and roll back via kubectl rollout undo. You can target a specific revision with --revision N, and --dry-run shows the current and target revisions before executing.

How do I scale a Kubernetes deployment from the command line?

Run scale_deployment.py with the deployment name, namespace, and --replicas N to change the replica count. Scaling to zero requires the --confirm-zero flag, and counts above 50 are rejected to prevent resource exhaustion.

Does this work with in-cluster Kubernetes authentication?

Yes, the scripts prefer in-cluster service account authentication when the token file exists, falling back to ~/.kube/config otherwise. This ensures the correct RBAC identity is used instead of a node-level IAM identity.

Why does the remediation script reject my pod or deployment name?

Names are validated against the RFC 1123 standard, requiring lowercase alphanumeric characters and hyphens with a 1-63 character limit. Names with uppercase letters, underscores, or invalid characters are rejected before any API call is made.