kubeview-mcp 1.6.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/README.md +68 -84
- package/SKILL.md +101 -92
- package/dist/scripts/publish-mcp.d.ts +3 -0
- package/dist/scripts/publish-mcp.d.ts.map +1 -0
- package/dist/scripts/publish-mcp.js +10 -0
- package/dist/scripts/publish-mcp.js.map +1 -0
- package/dist/scripts/release-publish.d.ts +36 -0
- package/dist/scripts/release-publish.d.ts.map +1 -0
- package/dist/scripts/release-publish.js +206 -0
- package/dist/scripts/release-publish.js.map +1 -0
- package/dist/src/kubernetes/resources/HelmReleaseOperations.d.ts +62 -0
- package/dist/src/kubernetes/resources/HelmReleaseOperations.d.ts.map +1 -0
- package/dist/src/kubernetes/resources/HelmReleaseOperations.js +381 -0
- package/dist/src/kubernetes/resources/HelmReleaseOperations.js.map +1 -0
- package/dist/src/plugins/HelmToolsPlugin.d.ts +3 -1
- package/dist/src/plugins/HelmToolsPlugin.d.ts.map +1 -1
- package/dist/src/plugins/HelmToolsPlugin.js +43 -6
- package/dist/src/plugins/HelmToolsPlugin.js.map +1 -1
- package/dist/src/tools/helm/BaseTool.d.ts +2 -1
- package/dist/src/tools/helm/BaseTool.d.ts.map +1 -1
- package/dist/src/tools/helm/BaseTool.js.map +1 -1
- package/dist/src/tools/helm/HelmGetHooksTool.d.ts +2 -1
- package/dist/src/tools/helm/HelmGetHooksTool.d.ts.map +1 -1
- package/dist/src/tools/helm/HelmGetHooksTool.js +1 -1
- package/dist/src/tools/helm/HelmGetHooksTool.js.map +1 -1
- package/dist/src/tools/helm/HelmGetManifestTool.d.ts +2 -1
- package/dist/src/tools/helm/HelmGetManifestTool.d.ts.map +1 -1
- package/dist/src/tools/helm/HelmGetManifestTool.js +1 -1
- package/dist/src/tools/helm/HelmGetManifestTool.js.map +1 -1
- package/dist/src/tools/helm/HelmGetNotesTool.d.ts +2 -1
- package/dist/src/tools/helm/HelmGetNotesTool.d.ts.map +1 -1
- package/dist/src/tools/helm/HelmGetNotesTool.js +1 -1
- package/dist/src/tools/helm/HelmGetNotesTool.js.map +1 -1
- package/dist/src/tools/helm/HelmGetResourcesTool.d.ts +2 -1
- package/dist/src/tools/helm/HelmGetResourcesTool.d.ts.map +1 -1
- package/dist/src/tools/helm/HelmGetResourcesTool.js +1 -1
- package/dist/src/tools/helm/HelmGetResourcesTool.js.map +1 -1
- package/dist/src/tools/helm/HelmGetTool.d.ts +4 -2
- package/dist/src/tools/helm/HelmGetTool.d.ts.map +1 -1
- package/dist/src/tools/helm/HelmGetTool.js +179 -91
- package/dist/src/tools/helm/HelmGetTool.js.map +1 -1
- package/dist/src/tools/helm/HelmGetValuesTool.d.ts +2 -1
- package/dist/src/tools/helm/HelmGetValuesTool.d.ts.map +1 -1
- package/dist/src/tools/helm/HelmGetValuesTool.js +1 -1
- package/dist/src/tools/helm/HelmGetValuesTool.js.map +1 -1
- package/dist/src/tools/helm/HelmHistoryTool.d.ts +2 -1
- package/dist/src/tools/helm/HelmHistoryTool.d.ts.map +1 -1
- package/dist/src/tools/helm/HelmHistoryTool.js +1 -1
- package/dist/src/tools/helm/HelmHistoryTool.js.map +1 -1
- package/dist/src/tools/helm/HelmListTool.d.ts +3 -1
- package/dist/src/tools/helm/HelmListTool.d.ts.map +1 -1
- package/dist/src/tools/helm/HelmListTool.js +42 -10
- package/dist/src/tools/helm/HelmListTool.js.map +1 -1
- package/dist/src/tools/helm/HelmListWithResourcesTool.d.ts +2 -1
- package/dist/src/tools/helm/HelmListWithResourcesTool.d.ts.map +1 -1
- package/dist/src/tools/helm/HelmListWithResourcesTool.js +1 -1
- package/dist/src/tools/helm/HelmListWithResourcesTool.js.map +1 -1
- package/dist/src/tools/helm/HelmStatusTool.d.ts +2 -1
- package/dist/src/tools/helm/HelmStatusTool.d.ts.map +1 -1
- package/dist/src/tools/helm/HelmStatusTool.js +1 -1
- package/dist/src/tools/helm/HelmStatusTool.js.map +1 -1
- package/dist/src/utils/HelmDataParser.d.ts +51 -0
- package/dist/src/utils/HelmDataParser.d.ts.map +1 -0
- package/dist/src/utils/HelmDataParser.js +144 -0
- package/dist/src/utils/HelmDataParser.js.map +1 -0
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/dist/tests/helm/HelmGetTool.test.d.ts +2 -0
- package/dist/tests/helm/HelmGetTool.test.d.ts.map +1 -0
- package/dist/tests/helm/HelmGetTool.test.js +78 -0
- package/dist/tests/helm/HelmGetTool.test.js.map +1 -0
- package/dist/tests/kubernetes/HelmReleaseOperations.test.d.ts +2 -0
- package/dist/tests/kubernetes/HelmReleaseOperations.test.d.ts.map +1 -0
- package/dist/tests/kubernetes/HelmReleaseOperations.test.js +218 -0
- package/dist/tests/kubernetes/HelmReleaseOperations.test.js.map +1 -0
- package/dist/tests/release/PublishWorkflow.test.d.ts +7 -0
- package/dist/tests/release/PublishWorkflow.test.d.ts.map +1 -0
- package/dist/tests/release/PublishWorkflow.test.js +103 -0
- package/dist/tests/release/PublishWorkflow.test.js.map +1 -0
- package/dist/tests/utils/HelmDataParser.test.d.ts +2 -0
- package/dist/tests/utils/HelmDataParser.test.d.ts.map +1 -0
- package/dist/tests/utils/HelmDataParser.test.js +81 -0
- package/dist/tests/utils/HelmDataParser.test.js.map +1 -0
- package/package.json +8 -7
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.7.1] - 2026-03-07
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- **Refactor publishing scripts and add tests for release workflow**
|
|
14
|
+
- **Enhance publish scripts and update README for clarity**
|
|
15
|
+
- **Update publish:mcp script in package.json to remove login requirement for mcp-publisher**
|
|
16
|
+
- **Refactor CLI run-command.js to simplify Kubernetes and Helm tool class handling**
|
|
17
|
+
|
|
18
|
+
## [1.7.0] - 2026-02-17
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
- **feat(helm): add API-first backend support for Helm commands**
|
|
22
|
+
- **feat(helm): add CLI fallback support for Helm v4 commands**
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
- **Refactor CLI run-command.js to simplify Kubernetes and Helm tool class handling**
|
|
26
|
+
|
|
10
27
|
## [1.6.0] - 2026-02-04
|
|
11
28
|
|
|
12
29
|
### Changed
|
package/README.md
CHANGED
|
@@ -1,29 +1,23 @@
|
|
|
1
1
|
# KubeView MCP – Kubernetes Model Context Protocol Server
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/kubeview-mcp)
|
|
3
4
|
[](https://opensource.org/licenses/MIT)
|
|
4
5
|
[](https://nodejs.org/)
|
|
5
6
|
[](https://www.typescriptlang.org/)
|
|
6
7
|
|
|
7
|
-
**KubeView** is a read-only Model Context Protocol (MCP) server that
|
|
8
|
-
Learn more about the benefits of code mode and implementation in [Evicting MCP tool calls from your Kubernetes cluster](https://dev.to/mikhae1/evicting-mcp-tool-calls-from-your-kubernetes-cluster-428k).
|
|
8
|
+
**KubeView** is a read-only [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) server that lets AI agents (Cursor, Claude Code, Codex CLI, Gemini CLI, etc.) safely inspect, diagnose, and debug Kubernetes clusters. It covers Kubernetes core, Helm, Argo Workflows, and Argo CD.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
## ✨ Features
|
|
13
|
-
|
|
14
|
-
- **🧠 Code Mode**: Sandboxed TypeScript environment for complex reasoning and multi-step workflows.
|
|
15
|
-
- **🛡️ Read-Only & Safe**: Designed for production safety with zero write access and sensitive data masking.
|
|
16
|
-
- **☸️ Kubernetes Integration**: List/get resources, fetch metrics, stream logs and events, execute commands, and tools to diagnose network issues.
|
|
17
|
-
- **📦 Helm Support**: Inspect releases, values, manifests, and history.
|
|
18
|
-
- **🐙 Argo Ecosystem**: Manage Argo Workflows and Argo CD applications using direct Kubernetes API or CLI.
|
|
10
|
+
> Read more: [Evicting MCP tool calls from your Kubernetes cluster](https://dev.to/mikhae1/evicting-mcp-tool-calls-from-your-kubernetes-cluster-428k)
|
|
19
11
|
|
|
20
12
|
---
|
|
21
13
|
|
|
22
|
-
##
|
|
14
|
+
## ✨ Features
|
|
23
15
|
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
16
|
+
- **🧠 Code Mode** – Sandboxed TypeScript runtime for complex reasoning and multi-step workflows.
|
|
17
|
+
- **🛡️ Read-Only & Safe** – Zero write access; sensitive data masking for production clusters.
|
|
18
|
+
- **☸️ Kubernetes** – List/get resources, fetch metrics, stream logs and events, exec into containers, diagnose network issues.
|
|
19
|
+
- **📦 Helm (API-first)** – Inspect releases, values, manifests, and history via the Kubernetes API with CLI fallback.
|
|
20
|
+
- **🐙 Argo Ecosystem** – Manage Argo Workflows and Argo CD via the Kubernetes API or CLI.
|
|
27
21
|
|
|
28
22
|
---
|
|
29
23
|
|
|
@@ -33,21 +27,21 @@ Learn more about the benefits of code mode and implementation in [Evicting MCP t
|
|
|
33
27
|
|
|
34
28
|
- Node.js ≥ 18
|
|
35
29
|
- Access to a Kubernetes cluster
|
|
36
|
-
-
|
|
30
|
+
- Optional CLIs in `$PATH`: `helm` (fallback only), `argo`, `argocd`
|
|
37
31
|
|
|
38
32
|
### Installation
|
|
39
33
|
|
|
40
34
|
```bash
|
|
41
|
-
#
|
|
35
|
+
# Run the server directly
|
|
42
36
|
npx -y kubeview-mcp
|
|
43
37
|
|
|
44
|
-
#
|
|
38
|
+
# Add to Claude Code
|
|
45
39
|
claude mcp add kubernetes -- npx kubeview-mcp
|
|
46
40
|
```
|
|
47
41
|
|
|
48
|
-
###
|
|
42
|
+
### MCP Client Configuration
|
|
49
43
|
|
|
50
|
-
Add to your `mcpServers`
|
|
44
|
+
Add to your `mcpServers` config (Cursor, Claude Desktop, etc.):
|
|
51
45
|
|
|
52
46
|
```json
|
|
53
47
|
{
|
|
@@ -62,104 +56,94 @@ Add to your `mcpServers` configuration (e.g., in Cursor or Claude Desktop):
|
|
|
62
56
|
|
|
63
57
|
### Environment Variables
|
|
64
58
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
|
68
|
-
|
|
69
|
-
| `
|
|
70
|
-
| `
|
|
71
|
-
| `MCP_LOG_LEVEL` | Log level (`error`, `warn`, `info`, `debug`) | `info` |
|
|
72
|
-
| `MCP_HIDE_SENSITIVE` | Enable global sensitive data masking | `false` |
|
|
59
|
+
| Variable | Description | Default |
|
|
60
|
+
| -------------------- | -------------------------------------------- | ---------------- |
|
|
61
|
+
| `KUBECONFIG` | Path to kubeconfig file | `~/.kube/config` |
|
|
62
|
+
| `MCP_MODE` | Server mode: `all`, `code`, or `tools` | `all` |
|
|
63
|
+
| `MCP_LOG_LEVEL` | Log level: `error`, `warn`, `info`, `debug` | `info` |
|
|
64
|
+
| `MCP_HIDE_SENSITIVE` | Mask sensitive data globally | `false` |
|
|
73
65
|
|
|
74
66
|
---
|
|
75
67
|
|
|
76
|
-
## 🛠️ Tools
|
|
68
|
+
## 🛠️ Tools
|
|
77
69
|
|
|
78
70
|
### Kubernetes
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
71
|
+
|
|
72
|
+
| Tool | Description |
|
|
73
|
+
| -------------- | -------------------------------------------------------- |
|
|
74
|
+
| `kube_list` | List resources or get cluster diagnostics |
|
|
75
|
+
| `kube_get` | Describe a specific resource (all K8s types supported) |
|
|
76
|
+
| `kube_metrics` | Fetch CPU/memory metrics for nodes and pods |
|
|
77
|
+
| `kube_logs` | Fetch or stream container logs |
|
|
78
|
+
| `kube_exec` | Execute commands inside containers |
|
|
79
|
+
| `kube_port` | Port-forward to pods or services |
|
|
80
|
+
| `kube_net` | Run in-cluster network diagnostics |
|
|
86
81
|
|
|
87
82
|
### Helm
|
|
88
|
-
|
|
89
|
-
|
|
83
|
+
|
|
84
|
+
| Tool | Description |
|
|
85
|
+
| ----------- | ----------------------------------------------------------------- |
|
|
86
|
+
| `helm_list` | List Helm releases (Kubernetes API first, CLI fallback) |
|
|
87
|
+
| `helm_get` | Fetch release values, manifests, notes, hooks, status, history |
|
|
88
|
+
|
|
89
|
+
**Helm execution strategy:** Tools read Helm metadata directly from Kubernetes storage (Secrets / ConfigMaps) by default — no `helm` binary needed for standard read-only use. CLI fallback is used for non-JSON formatting or non-Kubernetes storage backends (e.g. SQL).
|
|
90
90
|
|
|
91
91
|
### Argo
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
|
|
93
|
+
| Tool | Description |
|
|
94
|
+
| ------------- | ---------------------------------------- |
|
|
95
|
+
| `argo_list` | List Argo Workflows |
|
|
96
|
+
| `argo_get` | Inspect a specific Argo Workflow |
|
|
97
|
+
| `argocd_app` | Inspect Argo CD applications |
|
|
94
98
|
|
|
95
99
|
### Utilities
|
|
96
|
-
- **`run_code`**: Execute sandboxed TypeScript code for complex tasks.
|
|
97
|
-
- **`plan_step`**: Record step-by-step planning state for long, complex investigations.
|
|
98
100
|
|
|
99
|
-
|
|
101
|
+
| Tool | Description |
|
|
102
|
+
| ----------- | -------------------------------------------------------------- |
|
|
103
|
+
| `run_code` | Execute sandboxed TypeScript for complex tasks |
|
|
104
|
+
| `plan_step` | Persist step-by-step planning state across long investigations |
|
|
100
105
|
|
|
101
|
-
|
|
102
|
-
Instead of dumping a massive plan into the conversation, the agent can store step-by-step progress in `plan_step` and keep user-facing responses clean.
|
|
103
|
-
2. **A consistent state machine for long tasks.**
|
|
104
|
-
Complex workflows usually need: plan -> execute step 1 -> verify -> step 2 -> backtrack -> branch -> finalize. `plan_step` gives the agent a structured way to follow that lifecycle without losing track.
|
|
105
|
-
3. **Better tool routing.**
|
|
106
|
-
Good agents alternate between thinking and acting. `plan_step` encourages that rhythm: log intent, call real tools, capture outcome, decide next step.
|
|
106
|
+
**Why `plan_step`?** It keeps the chat context clean by storing progress externally, gives agents a structured state machine (plan → execute → verify → branch), and encourages the think-then-act rhythm that produces better results on complex workflows.
|
|
107
107
|
|
|
108
108
|
---
|
|
109
109
|
|
|
110
110
|
## 🧠 Code Mode
|
|
111
111
|
|
|
112
|
-
Inspired by [Code execution with MCP](https://www.anthropic.com/engineering/code-execution-with-mcp), KubeView ships
|
|
113
|
-
|
|
114
|
-
### What it provides
|
|
112
|
+
Inspired by [Code execution with MCP](https://www.anthropic.com/engineering/code-execution-with-mcp), KubeView ships a sandboxed code runtime for agents to explore the API and run complex workflows.
|
|
115
113
|
|
|
116
|
-
- **MCP Bridge
|
|
117
|
-
- **Dynamic TypeScript Definitions
|
|
118
|
-
- **Tool
|
|
119
|
-
- **Sandboxed Execution
|
|
114
|
+
- **MCP Bridge** – All registered MCP tools are callable from within `run_code`.
|
|
115
|
+
- **Dynamic TypeScript Definitions** – Tool schemas are auto-converted to a typed `global.d.ts`, preventing hallucinated parameters.
|
|
116
|
+
- **Tool Discovery** – `tools.search()` and `tools.list()` let agents find capabilities at runtime without loading the full schema.
|
|
117
|
+
- **Sandboxed Execution** – Locked-down Node.js `vm` environment with access only to `console` and the `tools` global.
|
|
120
118
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
For complex tasks requiring logic, loops, or data processing, use **Code Mode**:
|
|
119
|
+
Enable code-only mode:
|
|
124
120
|
|
|
125
121
|
```json
|
|
126
122
|
"env": { "MCP_MODE": "code" }
|
|
127
123
|
```
|
|
128
124
|
|
|
129
|
-
###
|
|
130
|
-
|
|
131
|
-
The server includes a built-in MCP server prompt named **`code-mode`** that injects the full TypeScript API documentation, tool overview, and examples into the context.
|
|
125
|
+
### Built-in `code-mode` Prompt
|
|
132
126
|
|
|
133
|
-
|
|
134
|
-
Simply type `/kubeview/code-mode` in the prompt (or select it from the `/` prompt menu). This gives the AI the exact context it needs to write correct `run_code` scripts immediately.
|
|
127
|
+
The server includes a **`code-mode`** MCP prompt that injects full TypeScript API docs and examples into the agent context. In Cursor, type `/kubeview/code-mode` in the prompt bar to activate it.
|
|
135
128
|
|
|
136
129
|
---
|
|
137
130
|
|
|
138
131
|
## 💻 Local Development
|
|
139
132
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
2. **Build & Run**:
|
|
148
|
-
```bash
|
|
149
|
-
npm run build
|
|
150
|
-
npm start
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
3. **Test**:
|
|
154
|
-
```bash
|
|
155
|
-
npm test
|
|
156
|
-
```
|
|
133
|
+
```bash
|
|
134
|
+
# Clone and install
|
|
135
|
+
git clone https://github.com/mikhae1/kubeview-mcp.git
|
|
136
|
+
cd kubeview-mcp
|
|
137
|
+
npm install
|
|
157
138
|
|
|
158
|
-
|
|
139
|
+
# Build and run
|
|
140
|
+
npm run build
|
|
141
|
+
npm start
|
|
159
142
|
|
|
160
|
-
|
|
143
|
+
# Test
|
|
144
|
+
npm test
|
|
161
145
|
|
|
162
|
-
|
|
146
|
+
# Run a tool directly via CLI
|
|
163
147
|
npm run command -- kube_list --namespace=default
|
|
164
148
|
```
|
|
165
149
|
|
package/SKILL.md
CHANGED
|
@@ -1,76 +1,81 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: kubeview-debug
|
|
3
|
+
description: Debug and diagnose Kubernetes clusters using KubeView MCP server tools. Use when investigating cluster issues (pod crashes, deployment failures, service connectivity problems, node issues, resource constraints), performing cluster health checks, or troubleshooting any Kubernetes workload. Trigger phrases include "cluster health", "pod won't start", "CrashLoopBackOff", "service unreachable", "deployment stuck", "node pressure", "OOMKilled", "ImagePullBackOff".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Kubernetes Cluster Debugging
|
|
2
7
|
|
|
3
|
-
|
|
8
|
+
Reusable investigation playbooks for debugging Kubernetes clusters using KubeView MCP.
|
|
4
9
|
|
|
5
|
-
##
|
|
10
|
+
## Core Principles
|
|
6
11
|
|
|
7
|
-
- **Read-Only
|
|
8
|
-
- **
|
|
9
|
-
- **Prefer MCP Tools**: Use `kube_*` tools over shelling out to `kubectl`.
|
|
12
|
+
- **Read-Only**: Avoid state changes unless explicitly authorized.
|
|
13
|
+
- **Prefer MCP Tools**: Use `kube_*` tools over `kubectl` commands.
|
|
10
14
|
- **Security First**: Treat output as potentially sensitive.
|
|
11
|
-
- **Declarative
|
|
15
|
+
- **Declarative Fixes**: Provide YAML snippets rather than imperative `kubectl` commands.
|
|
12
16
|
|
|
13
|
-
## Tool Quick
|
|
17
|
+
## Tool Quick Reference
|
|
14
18
|
|
|
15
|
-
- **Cluster
|
|
19
|
+
- **Cluster & Workloads**: `kube_list`, `kube_get`, `kube_metrics`
|
|
16
20
|
- **Logs**: `kube_logs` (single pod), `kube_log` (multi-pod with filters + events)
|
|
17
21
|
- **Network**: `kube_net`, `kube_exec`, `kube_port`
|
|
18
22
|
- **Discovery**: `search_tools` (tools-mode), `run_code` (code-mode)
|
|
19
23
|
|
|
20
|
-
In code-mode
|
|
21
|
-
|
|
22
|
-
---
|
|
24
|
+
In code-mode, tools become `tools.kubernetes.*` (e.g., `tools.kubernetes.list`).
|
|
23
25
|
|
|
24
26
|
## Debugging Decision Tree
|
|
25
27
|
|
|
26
28
|
```
|
|
27
29
|
Issue reported
|
|
28
30
|
│
|
|
29
|
-
├─ Pod not running? ──────────►
|
|
31
|
+
├─ Pod not running? ──────────► Skill: Debug Pod Failures
|
|
30
32
|
│
|
|
31
|
-
├─ Service unreachable? ──────►
|
|
33
|
+
├─ Service unreachable? ──────► Skill: Debug Service Connectivity
|
|
32
34
|
│
|
|
33
|
-
├─ Deployment stuck? ─────────►
|
|
35
|
+
├─ Deployment stuck? ─────────► Skill: Debug Deployment Rollout
|
|
34
36
|
│
|
|
35
|
-
├─ Node issues? ──────────────►
|
|
37
|
+
├─ Node issues? ──────────────► Skill: Node Debugging
|
|
36
38
|
│
|
|
37
|
-
└─ Performance/Resources? ────►
|
|
39
|
+
└─ Performance/Resources? ────► Skill: Resource Debugging
|
|
38
40
|
```
|
|
39
41
|
|
|
40
42
|
---
|
|
41
43
|
|
|
42
|
-
## Skill: Cluster Triage
|
|
44
|
+
## Skill: Cluster Triage
|
|
43
45
|
|
|
44
|
-
**
|
|
46
|
+
**When**: Get high-level cluster health overview, identify problem areas.
|
|
45
47
|
|
|
46
|
-
**
|
|
48
|
+
**Trigger**: "cluster health", "triage the cluster", "what's wrong"
|
|
47
49
|
|
|
48
|
-
|
|
50
|
+
**Steps**:
|
|
51
|
+
|
|
52
|
+
1. **Cluster diagnostics**
|
|
49
53
|
```json
|
|
50
54
|
{ "tool": "kube_list", "args": {} }
|
|
51
55
|
```
|
|
52
56
|
|
|
53
|
-
2. **Metrics +
|
|
57
|
+
2. **Metrics + top consumers**
|
|
54
58
|
```json
|
|
55
59
|
{ "tool": "kube_metrics", "args": { "diagnostics": true, "includeSummary": true, "topN": 5 } }
|
|
56
60
|
```
|
|
57
61
|
|
|
58
|
-
3. **
|
|
59
|
-
-
|
|
60
|
-
- List pods in that namespace:
|
|
62
|
+
3. **Drill into problem namespaces**
|
|
63
|
+
- Identify namespaces with high `CrashLoopBackOff` or `Pending` counts
|
|
61
64
|
```json
|
|
62
65
|
{ "tool": "kube_list", "args": { "namespace": "<ns>" } }
|
|
63
66
|
```
|
|
64
67
|
|
|
65
68
|
---
|
|
66
69
|
|
|
67
|
-
## Skill: Debug
|
|
70
|
+
## Skill: Debug Pod Failures
|
|
71
|
+
|
|
72
|
+
**When**: Pod is Pending, CrashLoopBackOff, ImagePullBackOff, or OOMKilled.
|
|
68
73
|
|
|
69
|
-
**
|
|
74
|
+
**Trigger**: "pod won't start", "CrashLoopBackOff", "ImagePullBackOff", "OOMKilled"
|
|
70
75
|
|
|
71
|
-
**
|
|
76
|
+
**Steps**:
|
|
72
77
|
|
|
73
|
-
1. **Describe
|
|
78
|
+
1. **Describe pod with events**
|
|
74
79
|
```json
|
|
75
80
|
{
|
|
76
81
|
"tool": "kube_get",
|
|
@@ -84,7 +89,7 @@ Issue reported
|
|
|
84
89
|
}
|
|
85
90
|
```
|
|
86
91
|
|
|
87
|
-
2. **
|
|
92
|
+
2. **Check logs (current & previous)**
|
|
88
93
|
```json
|
|
89
94
|
{
|
|
90
95
|
"tool": "kube_logs",
|
|
@@ -92,28 +97,25 @@ Issue reported
|
|
|
92
97
|
}
|
|
93
98
|
```
|
|
94
99
|
|
|
95
|
-
3. **Common
|
|
100
|
+
3. **Common causes**:
|
|
96
101
|
- **CrashLoopBackOff**:
|
|
97
|
-
- Exit
|
|
98
|
-
- Exit
|
|
99
|
-
- Exit
|
|
100
|
-
- **ImagePullBackOff**:
|
|
101
|
-
|
|
102
|
-
- Check ImagePullSecrets (registry auth).
|
|
103
|
-
- **Pending**:
|
|
104
|
-
- Insufficient CPU/Memory (Cluster full?).
|
|
105
|
-
- Unsatisfiable Node Affinity/Selector.
|
|
106
|
-
- PVC binding failure.
|
|
102
|
+
- Exit 1: App error (check logs)
|
|
103
|
+
- Exit 137: OOMKilled (memory limit too low)
|
|
104
|
+
- Exit 143: SIGTERM timeout
|
|
105
|
+
- **ImagePullBackOff**: Check image name/tag, verify ImagePullSecrets
|
|
106
|
+
- **Pending**: Insufficient resources, node affinity issues, or PVC binding failure
|
|
107
107
|
|
|
108
108
|
---
|
|
109
109
|
|
|
110
|
-
## Skill: Debug
|
|
110
|
+
## Skill: Debug Deployment Rollout
|
|
111
|
+
|
|
112
|
+
**When**: Deployment has 0 ready replicas or rollout not progressing.
|
|
111
113
|
|
|
112
|
-
**
|
|
114
|
+
**Trigger**: "deployment stuck", "rollout not progressing", "0/1 ready"
|
|
113
115
|
|
|
114
|
-
**
|
|
116
|
+
**Steps**:
|
|
115
117
|
|
|
116
|
-
1. **Check
|
|
118
|
+
1. **Check deployment status**
|
|
117
119
|
```json
|
|
118
120
|
{
|
|
119
121
|
"tool": "kube_get",
|
|
@@ -126,7 +128,7 @@ Issue reported
|
|
|
126
128
|
}
|
|
127
129
|
```
|
|
128
130
|
|
|
129
|
-
2. **Inspect ReplicaSets** (Is
|
|
131
|
+
2. **Inspect ReplicaSets** (Is new RS failing to create pods?)
|
|
130
132
|
```json
|
|
131
133
|
{
|
|
132
134
|
"tool": "kube_list",
|
|
@@ -134,7 +136,7 @@ Issue reported
|
|
|
134
136
|
}
|
|
135
137
|
```
|
|
136
138
|
|
|
137
|
-
3. **Aggregate
|
|
139
|
+
3. **Aggregate logs** (Are new pods failing immediately?)
|
|
138
140
|
```json
|
|
139
141
|
{
|
|
140
142
|
"tool": "kube_log",
|
|
@@ -148,29 +150,31 @@ Issue reported
|
|
|
148
150
|
}
|
|
149
151
|
```
|
|
150
152
|
|
|
151
|
-
**Common
|
|
152
|
-
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
153
|
+
**Common issues**:
|
|
154
|
+
- New ReplicaSet can't create pods (quota/errors?)
|
|
155
|
+
- Pods running but failing readiness probe
|
|
156
|
+
- Old ReplicaSets not cleaning up (strategy issue)
|
|
155
157
|
|
|
156
158
|
---
|
|
157
159
|
|
|
158
|
-
## Skill: Debug
|
|
160
|
+
## Skill: Debug Service Connectivity
|
|
159
161
|
|
|
160
|
-
**
|
|
162
|
+
**When**: Service has no traffic, endpoints missing, or unreachable.
|
|
161
163
|
|
|
162
|
-
**
|
|
164
|
+
**Trigger**: "service unreachable", "no endpoints", "can't reach service"
|
|
163
165
|
|
|
164
|
-
|
|
166
|
+
**Steps**:
|
|
167
|
+
|
|
168
|
+
1. **Verify endpoints exist**
|
|
165
169
|
```json
|
|
166
170
|
{
|
|
167
171
|
"tool": "kube_get",
|
|
168
172
|
"args": { "resourceType": "endpoints", "name": "<svc>", "namespace": "<ns>" }
|
|
169
173
|
}
|
|
170
174
|
```
|
|
171
|
-
-
|
|
175
|
+
- Empty? Check Service selector vs Pod labels. Are pods Ready?
|
|
172
176
|
|
|
173
|
-
2. **Test
|
|
177
|
+
2. **Test connectivity from cluster**
|
|
174
178
|
```json
|
|
175
179
|
{
|
|
176
180
|
"tool": "kube_net",
|
|
@@ -188,53 +192,73 @@ Issue reported
|
|
|
188
192
|
|
|
189
193
|
## Skill: Node Debugging
|
|
190
194
|
|
|
191
|
-
**
|
|
195
|
+
**When**: Node-level issues causing pod failures.
|
|
196
|
+
|
|
197
|
+
**Trigger**: "node not ready", "node pressure", "taints blocking pods"
|
|
192
198
|
|
|
193
|
-
**
|
|
199
|
+
**Steps**:
|
|
194
200
|
|
|
195
|
-
1. **List
|
|
201
|
+
1. **List nodes**
|
|
196
202
|
```json
|
|
197
203
|
{ "tool": "kube_list", "args": { "resourceType": "node" } }
|
|
198
204
|
```
|
|
199
205
|
|
|
200
|
-
2. **Describe
|
|
206
|
+
2. **Describe specific node**
|
|
201
207
|
```json
|
|
202
208
|
{ "tool": "kube_get", "args": { "resourceType": "node", "name": "<node>", "includeEvents": true } }
|
|
203
209
|
```
|
|
204
210
|
|
|
205
|
-
**
|
|
206
|
-
- **Ready**: Must be `True
|
|
207
|
-
- **MemoryPressure
|
|
208
|
-
- **NetworkUnavailable**: CNI plugin failure
|
|
211
|
+
**Key conditions**:
|
|
212
|
+
- **Ready**: Must be `True`
|
|
213
|
+
- **MemoryPressure/DiskPressure/PIDPressure**: If `True`, node is evicting pods
|
|
214
|
+
- **NetworkUnavailable**: CNI plugin failure
|
|
209
215
|
|
|
210
216
|
---
|
|
211
217
|
|
|
212
218
|
## Skill: Resource Debugging
|
|
213
219
|
|
|
214
|
-
**
|
|
220
|
+
**When**: Detecting resource bottlenecks (CPU throttling, OOM).
|
|
215
221
|
|
|
216
|
-
**
|
|
222
|
+
**Trigger**: "CPU throttling", "memory pressure", "high CPU/memory"
|
|
217
223
|
|
|
218
|
-
|
|
224
|
+
**Steps**:
|
|
225
|
+
|
|
226
|
+
1. **Top consumers**
|
|
219
227
|
```json
|
|
220
228
|
{ "tool": "kube_metrics", "args": { "topN": 10, "includeSummary": true } }
|
|
221
229
|
```
|
|
222
230
|
|
|
223
|
-
2. **OOMKilled
|
|
224
|
-
- Check `kube_get` pod status for `LastState: OOMKilled
|
|
225
|
-
- Solution: Increase
|
|
231
|
+
2. **OOMKilled investigation**
|
|
232
|
+
- Check `kube_get` pod status for `LastState: OOMKilled`
|
|
233
|
+
- Solution: Increase memory limit or fix leak
|
|
234
|
+
|
|
235
|
+
3. **CPU throttling**
|
|
236
|
+
- App slow but no errors? Check if usage near CPU limit
|
|
237
|
+
- Solution: Increase CPU limit or remove limit (keep request)
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Advanced: Code Mode Bulk Analysis
|
|
226
242
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
243
|
+
**When**: Complex queries requiring logic (e.g., "find all pods without resource limits").
|
|
244
|
+
|
|
245
|
+
**Trigger**: "bulk analysis", "find pods without limits", "code mode"
|
|
246
|
+
|
|
247
|
+
**Example**:
|
|
248
|
+
```typescript
|
|
249
|
+
const pods = await tools.kubernetes.list({ resourceType: 'pod' });
|
|
250
|
+
const noLimits = pods.items.filter(p =>
|
|
251
|
+
p.spec.containers.some(c => !c.resources?.limits)
|
|
252
|
+
);
|
|
253
|
+
return { count: noLimits.length, names: noLimits.map(p => p.metadata.name) };
|
|
254
|
+
```
|
|
230
255
|
|
|
231
256
|
---
|
|
232
257
|
|
|
233
|
-
##
|
|
258
|
+
## Multi-Step Investigation Hygiene
|
|
234
259
|
|
|
235
|
-
|
|
260
|
+
For complex investigations spanning multiple steps, use `plan_step` to maintain clear progress tracking:
|
|
236
261
|
|
|
237
|
-
**Template**:
|
|
238
262
|
```json
|
|
239
263
|
{
|
|
240
264
|
"tool": "plan_step",
|
|
@@ -246,18 +270,3 @@ Issue reported
|
|
|
246
270
|
}
|
|
247
271
|
}
|
|
248
272
|
```
|
|
249
|
-
|
|
250
|
-
---
|
|
251
|
-
|
|
252
|
-
## Skill: One-shot Code Mode Triage (Advanced)
|
|
253
|
-
|
|
254
|
-
**Intent**: Use `run_code` for complex logic (e.g., "Find all pods without resource limits").
|
|
255
|
-
|
|
256
|
-
**Example**:
|
|
257
|
-
```typescript
|
|
258
|
-
const pods = await tools.kubernetes.list({ resourceType: 'pod' });
|
|
259
|
-
const noLimits = pods.items.filter(p =>
|
|
260
|
-
p.spec.containers.some(c => !c.resources?.limits)
|
|
261
|
-
);
|
|
262
|
-
return { count: noLimits.length, names: noLimits.map(p => p.metadata.name) };
|
|
263
|
-
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish-mcp.d.ts","sourceRoot":"","sources":["../../scripts/publish-mcp.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish-mcp.js","sourceRoot":"","sources":["../../scripts/publish-mcp.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,IAAI,CAAC;IACH,UAAU,EAAE,CAAC;AACf,CAAC;AAAC,OAAO,KAAK,EAAE,CAAC;IACf,OAAO,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACtE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
type RunnerResult = {
|
|
3
|
+
status: number;
|
|
4
|
+
stdout: string;
|
|
5
|
+
stderr: string;
|
|
6
|
+
error?: NodeJS.ErrnoException;
|
|
7
|
+
};
|
|
8
|
+
type RunnerOptions = {
|
|
9
|
+
interactive?: boolean;
|
|
10
|
+
quiet?: boolean;
|
|
11
|
+
env?: NodeJS.ProcessEnv;
|
|
12
|
+
};
|
|
13
|
+
export type Runner = (command: string, args: string[], options?: RunnerOptions) => RunnerResult;
|
|
14
|
+
type PublishStep = 'all' | 'commit' | 'tag' | 'npm' | 'git' | 'mcp';
|
|
15
|
+
type PackageInfo = {
|
|
16
|
+
name: string;
|
|
17
|
+
version: string;
|
|
18
|
+
};
|
|
19
|
+
export declare function createRunner(options?: {
|
|
20
|
+
cwd?: string;
|
|
21
|
+
env?: NodeJS.ProcessEnv;
|
|
22
|
+
stdout?: Pick<NodeJS.WriteStream, 'write'>;
|
|
23
|
+
stderr?: Pick<NodeJS.WriteStream, 'write'>;
|
|
24
|
+
}): Runner;
|
|
25
|
+
export declare function publishMcp(options?: {
|
|
26
|
+
runner?: Runner;
|
|
27
|
+
cwd?: string;
|
|
28
|
+
}): 'published' | 'skipped';
|
|
29
|
+
export declare function runPublishWorkflow(options?: {
|
|
30
|
+
step?: PublishStep;
|
|
31
|
+
cwd?: string;
|
|
32
|
+
runner?: Runner;
|
|
33
|
+
packageInfo?: PackageInfo;
|
|
34
|
+
}): void;
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=release-publish.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release-publish.d.ts","sourceRoot":"","sources":["../../scripts/release-publish.ts"],"names":[],"mappings":";AAQA,KAAK,YAAY,GAAG;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC;CAC/B,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,aAAa,KAAK,YAAY,CAAC;AAEhG,KAAK,WAAW,GAAG,KAAK,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAEpE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAWF,wBAAgB,YAAY,CAC1B,OAAO,GAAE;IACP,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAC3C,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;CACvC,GACL,MAAM,CA+BR;AA6FD,wBAAgB,UAAU,CACxB,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,GAC9C,WAAW,GAAG,SAAS,CAkCzB;AAoED,wBAAgB,kBAAkB,CAChC,OAAO,GAAE;IACP,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,WAAW,CAAC;CACtB,GACL,IAAI,CAyBN"}
|