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
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,9 @@ This extension enables declarative Kubernetes interactions within mcpchecker tas
11
11
|`kubernetes.authCanI`| Check if a user or service account can perform an action on a resource |
12
12
|`kubernetes.create`| Create a Kubernetes resource |
13
13
|`kubernetes.delete`| Delete a Kubernetes resource |
14
+
|`kubernetes.getCurrentContext`| Get the current context from kubeconfig |
15
+
|`kubernetes.listContexts`| List all contexts from kubeconfig |
16
+
|`kubernetes.viewConfig`| View kubeconfig as YAML (optionally minified) |
14
17
|`kubernetes.wait`| Wait for a condition on a resource (e.g., `Ready`, `Available`) |
15
18
16
19
## Configuration
@@ -132,6 +135,43 @@ Waits for a condition on a resource. Supports configurable timeout and expected
132
135
timeout: 5m # optional, defaults to 60s
133
136
```
134
137
138
+
### kubernetes.listContexts
139
+
140
+
Lists all contexts from the kubeconfig file, including which one is currently active.
141
+
142
+
```yaml
143
+
- kubernetes.listContexts:
144
+
# No parameters required
145
+
```
146
+
147
+
**Outputs:**
148
+
- `current`: Name of the current context
149
+
- `count`: Number of contexts found
150
+
151
+
### kubernetes.getCurrentContext
152
+
153
+
Returns the current context name from the kubeconfig.
154
+
155
+
```yaml
156
+
- kubernetes.getCurrentContext:
157
+
# No parameters required
158
+
```
159
+
160
+
**Outputs:**
161
+
- `context`: Name of the current context
162
+
163
+
### kubernetes.viewConfig
164
+
165
+
Views the kubeconfig as YAML, optionally minified to show only the current context.
166
+
167
+
```yaml
168
+
- kubernetes.viewConfig:
169
+
minify: false # optional, defaults to false
170
+
```
171
+
172
+
**Outputs:**
173
+
- `config`: The kubeconfig content as YAML
174
+
135
175
## Contributing
136
176
137
177
Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, project structure, and guidelines for adding new operations.
0 commit comments