describe-deployment
Retrieve detailed status and configuration information for a specific Kubernetes deployment to monitor its health and troubleshoot issues.
Instructions
Describe details of a Kubernetes deployment
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deployment | Yes | The name of the deployment to describe | |
| namespace | No | The namespace of the deployment (optional, defaults to current context namespace) |
Implementation Reference
- server.js:1538-1546 (handler)The execution handler for the 'describe-deployment' tool. It destructures the deployment name and optional namespace from arguments, constructs a kubectl describe command, executes it using execAsync, and returns the stdout as text content or a fallback message if no output.case "describe-deployment": { const { deployment, namespace } = args; const nsArg = namespace ? `-n ${namespace}` : ""; const cmd = `kubectl describe deployment ${deployment} ${nsArg}`; const { stdout } = await execAsync(cmd); return { content: [{ type: "text", text: stdout || "No deployment details found" }] }; }
- server.js:196-211 (schema)The tool schema definition including name, description, and inputSchema for validation. This object is part of the static 'tools' array returned in response to ListTools requests, effectively registering the tool.name: "describe-deployment", description: "Describe details of a Kubernetes deployment", inputSchema: { type: "object", properties: { deployment: { type: "string", description: "The name of the deployment to describe" }, namespace: { type: "string", description: "The namespace of the deployment (optional, defaults to current context namespace)" } }, required: ["deployment"] }
- server.js:1392-1394 (registration)The request handler for ListToolsRequestSchema that returns the static list of tools (including describe-deployment), which serves as the tool registration mechanism in MCP.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });