Skip to content

Commit 7a9a8ff

Browse files
committed
feat: add cluster health check prompt
Signed-off-by: Rohit Patil <[email protected]>
1 parent c28c02e commit 7a9a8ff

File tree

4 files changed

+838
-2
lines changed

4 files changed

+838
-2
lines changed

docs/PROMPTS.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,43 @@ content = "I'll retrieve and analyze the logs for you."
5757
### Argument Substitution
5858
Use `{{argument_name}}` placeholders in message content. The template engine replaces these with actual values when the prompt is called.
5959

60+
## Built-in Prompts
61+
62+
The Kubernetes MCP Server includes several built-in prompts that are always available:
63+
64+
### `cluster-health-check`
65+
66+
Performs a comprehensive health assessment of your Kubernetes or OpenShift cluster.
67+
68+
**Arguments:**
69+
- `namespace` (optional): Limit the health check to a specific namespace. Default: all namespaces.
70+
- `verbose` (optional): Enable detailed resource-level information. Values: `true` or `false`. Default: `false`.
71+
- `check_events` (optional): Include recent warning/error events in the analysis. Values: `true` or `false`. Default: `true`.
72+
73+
**What it checks:**
74+
- **Nodes**: Status and conditions (Ready, MemoryPressure, DiskPressure, etc.)
75+
- **Cluster Operators** (OpenShift only): Available and degraded status
76+
- **Pods**: Phase, container statuses, restart counts, and common issues (CrashLoopBackOff, ImagePullBackOff, etc.)
77+
- **Workload Controllers**: Deployments, StatefulSets, and DaemonSets replica status
78+
- **Persistent Volume Claims**: Binding status
79+
- **Events**: Recent warning and error events from the last hour
80+
81+
**Example usage:**
82+
```
83+
Check the health of my cluster
84+
```
85+
86+
Or with specific parameters:
87+
```
88+
Check the health of namespace production with verbose output
89+
```
90+
91+
The prompt gathers comprehensive diagnostic data and presents it to the LLM for analysis, which will provide:
92+
1. Overall health status (Healthy, Warning, or Critical)
93+
2. Critical issues requiring immediate attention
94+
3. Warnings and recommendations
95+
4. Summary by component
96+
6097
## Configuration File Location
6198

6299
Place your prompts in the `config.toml` file used by the MCP server. Specify the config file path using the `--config` flag when starting the server.

0 commit comments

Comments
 (0)