# Remediation Guide This guide covers the RemediationPolicy CRD for event-driven remediation using the DevOps AI Toolkit. ## Overview The RemediationPolicy CRD monitors Kubernetes events and forwards them to the DevOps AI Toolkit MCP for analysis and remediation. It supports: - **Event Watching**: Configurable filtering of Kubernetes events by type, reason, and involved objects - **Automatic Mode**: System detects, analyzes, and fixes issues without human intervention - **Manual Mode**: System detects and analyzes issues, provides recommendations via Slack for humans to execute - **Slack Notifications**: Rich notifications with remediation results and next steps - **Rate Limiting**: Prevents event storms with configurable cooldowns - **Status Reporting**: Comprehensive observability through status updates ## Prerequisites - Controller installed (see [Setup Guide](setup-guide.md)) - **DevOps AI Toolkit MCP installed** - See [DevOps AI Toolkit documentation](/docs/mcp) - Slack webhook URL (optional, for Slack notifications) - Google Chat webhook URL (optional, for Google Chat notifications - requires Google Workspace paid account) ## Create a RemediationPolicy Create a RemediationPolicy to start processing events: ```bash # Create a Secret containing your MCP auth token (required for Kubernetes deployments) # Use the same token configured in the MCP server's DOT_AI_AUTH_TOKEN environment variable kubectl create secret generic dot-ai-secrets \ --from-literal=auth-token="your-mcp-auth-token" \ --namespace dot-ai # Create a Secret containing your Slack webhook URL (optional, for notifications) kubectl create secret generic slack-webhook \ --from-literal=url="https://hooks.slack.com/services/YOUR/WEBHOOK/URL" \ --namespace dot-ai # Apply the policy kubectl apply --filename - <