describe-secret
Retrieve detailed information about a specific Kubernetes secret, including its data and metadata, to inspect configuration or troubleshoot issues.
Instructions
Describe details of a Kubernetes secret
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| secret | Yes | The name of the secret to describe | |
| namespace | No | The namespace of the secret (optional, defaults to current context namespace) |
Implementation Reference
- server.js:1577-1585 (handler)The execution handler for the 'describe-secret' tool. It constructs a 'kubectl describe secret' command using the provided secret name and optional namespace, executes it, and returns the stdout output.case "describe-secret": { const { secret, namespace } = args; const nsArg = namespace ? `-n ${namespace}` : ""; const cmd = `kubectl describe secret ${secret} ${nsArg}`; const { stdout } = await execAsync(cmd); return { content: [{ type: "text", text: stdout || "No secret details found" }] }; }
- server.js:263-280 (schema)The tool schema definition including name, description, and input schema for validating arguments: secret (required string), namespace (optional string).{ name: "describe-secret", description: "Describe details of a Kubernetes secret", inputSchema: { type: "object", properties: { secret: { type: "string", description: "The name of the secret to describe" }, namespace: { type: "string", description: "The namespace of the secret (optional, defaults to current context namespace)" } }, required: ["secret"] } },
- server.js:1392-1394 (registration)Registration of the describe-secret tool as part of the tools list returned in response to ListToolsRequestSchema.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });