You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+49-1Lines changed: 49 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,8 @@ A powerful and flexible Kubernetes [Model Context Protocol (MCP)](https://blog.m
17
17
-**✅ Configuration**:
18
18
- Automatically detect changes in the Kubernetes configuration and update the MCP server.
19
19
-**View** and manage the current [Kubernetes `.kube/config`](https://blog.marcnuri.com/where-is-my-default-kubeconfig-file) or in-cluster configuration.
20
+
-**Multi-cluster support**: Switch between different Kubernetes contexts on the fly using the optional `context` parameter on any cluster-specific tool.
21
+
-**List available contexts**: Discover all available Kubernetes contexts in your kubeconfig with `contexts_list`.
20
22
-**✅ Generic Kubernetes Resources**: Perform operations on **any** Kubernetes or OpenShift resource.
21
23
- Any CRUD operation (Create or Update, Get, List, Delete).
22
24
-**✅ Pods**: Perform Pod-specific operations.
@@ -196,11 +198,21 @@ Get the current Kubernetes configuration content as a kubeconfig YAML
196
198
- If `true`, keeps only the current-context and relevant configuration pieces
197
199
- If `false`, returns all contexts, clusters, auth-infos, and users
198
200
201
+
### `contexts_list`
202
+
203
+
List all available Kubernetes contexts from your kubeconfig with their cluster server URLs
204
+
205
+
**Parameters:** None
206
+
207
+
**Output format:**`[*] CONTEXT_NAME -> CLUSTER_SERVER_URL` where `*` indicates the current active context.
208
+
199
209
### `events_list`
200
210
201
211
List all the Kubernetes events in the current cluster from all namespaces
202
212
203
213
**Parameters:**
214
+
-`context` (`string`, optional)
215
+
- Kubernetes context to use for this operation. If not provided, uses the current context
204
216
-`namespace` (`string`, optional)
205
217
- Namespace to retrieve the events from. If not provided, will list events from all namespaces
206
218
@@ -209,6 +221,8 @@ List all the Kubernetes events in the current cluster from all namespaces
209
221
Install a Helm chart in the current or provided namespace with the provided name and chart
210
222
211
223
**Parameters:**
224
+
-`context` (`string`, optional)
225
+
- Kubernetes context to use for this operation. If not provided, uses the current context
212
226
-`chart` (`string`, required)
213
227
- Name of the Helm chart to install
214
228
- Can be a local path or a remote URL
@@ -228,6 +242,8 @@ Install a Helm chart in the current or provided namespace with the provided name
228
242
List all the Helm releases in the current or provided namespace (or in all namespaces if specified)
229
243
230
244
**Parameters:**
245
+
-`context` (`string`, optional)
246
+
- Kubernetes context to use for this operation. If not provided, uses the current context
231
247
-`namespace` (`string`, optional)
232
248
- Namespace to list the Helm releases from
233
249
- If not provided, will use the configured namespace
@@ -240,6 +256,8 @@ List all the Helm releases in the current or provided namespace (or in all names
240
256
Uninstall a Helm release in the current or provided namespace with the provided name
241
257
242
258
**Parameters:**
259
+
-`context` (`string`, optional)
260
+
- Kubernetes context to use for this operation. If not provided, uses the current context
243
261
-`name` (`string`, required)
244
262
- Name of the Helm release to uninstall
245
263
-`namespace` (`string`, optional)
@@ -250,13 +268,17 @@ Uninstall a Helm release in the current or provided namespace with the provided
250
268
251
269
List all the Kubernetes namespaces in the current cluster
252
270
253
-
**Parameters:** None
271
+
**Parameters:**
272
+
-`context` (`string`, optional)
273
+
- Kubernetes context to use for this operation. If not provided, uses the current context
254
274
255
275
### `pods_delete`
256
276
257
277
Delete a Kubernetes Pod in the current or provided namespace with the provided name
258
278
259
279
**Parameters:**
280
+
-`context` (`string`, optional)
281
+
- Kubernetes context to use for this operation. If not provided, uses the current context
260
282
-`name` (`string`, required)
261
283
- Name of the Pod to delete
262
284
-`namespace` (`string`, required)
@@ -267,6 +289,8 @@ Delete a Kubernetes Pod in the current or provided namespace with the provided n
267
289
Execute a command in a Kubernetes Pod in the current or provided namespace with the provided name and command
268
290
269
291
**Parameters:**
292
+
-`context` (`string`, optional)
293
+
- Kubernetes context to use for this operation. If not provided, uses the current context
270
294
-`command` (`string[]`, required)
271
295
- Command to execute in the Pod container
272
296
- First item is the command, rest are arguments
@@ -283,6 +307,8 @@ Execute a command in a Kubernetes Pod in the current or provided namespace with
283
307
Get a Kubernetes Pod in the current or provided namespace with the provided name
284
308
285
309
**Parameters:**
310
+
-`context` (`string`, optional)
311
+
- Kubernetes context to use for this operation. If not provided, uses the current context
286
312
-`name` (`string`, required)
287
313
- Name of the Pod
288
314
-`namespace` (`string`, required)
@@ -293,6 +319,8 @@ Get a Kubernetes Pod in the current or provided namespace with the provided name
293
319
List all the Kubernetes pods in the current cluster from all namespaces
294
320
295
321
**Parameters:**
322
+
-`context` (`string`, optional)
323
+
- Kubernetes context to use for this operation. If not provided, uses the current context
296
324
-`labelSelector` (`string`, optional)
297
325
- Kubernetes label selector (e.g., 'app=myapp,env=prod' or 'app in (myapp,yourapp)'). Use this option to filter the pods by label
298
326
@@ -301,6 +329,8 @@ List all the Kubernetes pods in the current cluster from all namespaces
301
329
List all the Kubernetes pods in the specified namespace in the current cluster
302
330
303
331
**Parameters:**
332
+
-`context` (`string`, optional)
333
+
- Kubernetes context to use for this operation. If not provided, uses the current context
304
334
-`namespace` (`string`, required)
305
335
- Namespace to list pods from
306
336
-`labelSelector` (`string`, optional)
@@ -311,6 +341,8 @@ List all the Kubernetes pods in the specified namespace in the current cluster
311
341
Get the logs of a Kubernetes Pod in the current or provided namespace with the provided name
312
342
313
343
**Parameters:**
344
+
-`context` (`string`, optional)
345
+
- Kubernetes context to use for this operation. If not provided, uses the current context
314
346
-`name` (`string`, required)
315
347
- Name of the Pod to get logs from
316
348
-`namespace` (`string`, required)
@@ -325,6 +357,8 @@ Get the logs of a Kubernetes Pod in the current or provided namespace with the p
325
357
Run a Kubernetes Pod in the current or provided namespace with the provided container image and optional name
326
358
327
359
**Parameters:**
360
+
-`context` (`string`, optional)
361
+
- Kubernetes context to use for this operation. If not provided, uses the current context
328
362
-`image` (`string`, required)
329
363
- Container Image to run in the Pod
330
364
-`namespace` (`string`, required)
@@ -340,6 +374,8 @@ Run a Kubernetes Pod in the current or provided namespace with the provided cont
340
374
Lists the resource consumption (CPU and memory) as recorded by the Kubernetes Metrics Server for the specified Kubernetes Pods in the all namespaces, the provided namespace, or the current namespace
341
375
342
376
**Parameters:**
377
+
-`context` (`string`, optional)
378
+
- Kubernetes context to use for this operation. If not provided, uses the current context
0 commit comments