Create Kubernetes resources from Slack with Anthropic Claude and safety guardrails
Needs changesNeeds changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.
What to replace before upgrading
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) Kubernetes Manifest Generator (v1.6) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Worth a look
- Slack Trigger requires a signing secret on the Slack API credential (When Slack Request Received)
Nodes used (10)
- Slack Trigger
n8n-nodes-base.slackTrigger - Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - AI Agent
@n8n/n8n-nodes-langchain.agent - Anthropic Chat Model
@n8n/n8n-nodes-langchain.lmChatAnthropic - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Slack
n8n-nodes-base.slack - Wait
n8n-nodes-base.wait - HTTP Request
n8n-nodes-base.httpRequest
What it does
Quick overview This workflow listens for Kubernetes create requests in Slack (or runs manually), uses Anthropic Claude to generate a Kubernetes manifest, validates it against deterministic safety guardrails, requests human approval in Slack, then applies the manifest via the Kubernetes API and verifies rollout health with automatic rollback on failure. How it works 1. Triggers from a Slack app mention or a manual run and captures a plain-English description of the Kubernetes resource to create. 2. Uses Anthropic Claude to generate a Kubernetes resource manifest as structured JSON plus a short explanation. 3. Parses the model output and deterministically validates the manifest against guardrails (allowed namespaces, required CPU/memory requests and limits, and blocked privileged/hostNetwork/hostPath usage). 4. If validation fails, posts the specific violations back to Slack and stops. 5. If validation passes, posts the manifest and explanation to Slack and waits for a human approve/reject decision. 6. On approval, sends the manifest to the Kubernetes API to create the resource, waits briefly, then fetches status and evaluates readiness/availability. 7. If the rollout is healthy, posts a success confirmation to Slack; if not, deletes the created resource via the Kubernetes API and alerts Slack about the rollback. Setup 1. Create and connect credentials for Anthropic (Claude), Slack (bot/token with permission to post messages and receive app mentions), and an HTTP Header Auth credential that sends your Kubernetes API bearer token. 2. Update the configuration values in the workflow for your Kubernetes API base URL, allowed namespaces, Slack target channel, and rollout grace/timeout values. 3. Configure your Slack app to enable app mentions in the target channel and ensure the workflow’s Slack Trigger is subscribed to the correct channel.