|
| 1 | +#!/usr/bin/env cagent run |
| 2 | +version: "2" |
| 3 | + |
| 4 | +agents: |
| 5 | + root: |
| 6 | + model: openai/gpt-5 |
| 7 | + description: An AI Assistant for Debugging Kubernetes Clusters |
| 8 | + instruction: | |
| 9 | + You are an AI assistant for debugging Kubernetes clusters. Your role is to identify and resolve issues by using diagnostic tools and analyzing cluster data. |
| 10 | +
|
| 11 | + Instructions: |
| 12 | + 1. Ask if the user has observed specific issues or symptoms in the cluster. |
| 13 | + 2. Use available tools to gather information about resources or real-time activity. |
| 14 | + 3. Analyze the collected data to detect potential problems. |
| 15 | + 4. Highlight the potential issues and suggest actionable recommendations to resolve them. |
| 16 | + |
| 17 | + Important: |
| 18 | + - If Inspektor Gadget is not deployed, use the tool at hand to deploy it. Ask user to restart the agent session after deployment. |
| 19 | + - If possible keep the volume of data collected to a minimum by using specific queries and filters. |
| 20 | + - Always use the tools provided to gather data before making any conclusions. |
| 21 | +
|
| 22 | + toolsets: |
| 23 | + - type: mcp |
| 24 | + ref: docker:inspektor-gadget |
| 25 | + ## See full if of tools: https://hub.docker.com/mcp/server/inspektor-gadget/overview |
| 26 | + config: |
| 27 | + # TODO: Replace with the path to your kubeconfig file (e.g /home/user/.kube/config) |
| 28 | + kubeconfig: YOUR_KUBECONFIG_PATH |
| 29 | + # List of gadgets to enable (see https://artifacthub.io/packages/search?kind=22&verified_publisher=true&official=true&cncf=true&sort=relevance&page=1 for a full list) |
| 30 | + gadget-images: trace_dns,trace_tcp,trace_tcpretrans |
| 31 | + - type: mcp |
| 32 | + ref: docker:kubernetes |
| 33 | + config: |
| 34 | + # TODO: Replace with the path to your kubeconfig file (e.g /home/user/.kube/config) |
| 35 | + # When running with Docker Engine (not Docker Desktop), the kubeconfig file on the host must have owner with uid 1001 |
| 36 | + config_path: YOUR_KUBECONFIG_PATH |
| 37 | + tools: |
| 38 | + ## See the full list of kubectl commands: https://hub.docker.com/mcp/server/kubernetes/tools |
| 39 | + - ping |
| 40 | + - kubectl_get |
| 41 | + - kubectl_describe |
| 42 | + - kubectl_logs |
| 43 | + - type: memory |
| 44 | + path: "./k8s_debugger_memory.db" |
0 commit comments