k8s_get_documentation
Retrieve accurate Kubernetes documentation for kubectl commands, API objects, manifests, or version-specific features. Connects to a trusted, version-aware index to provide relevant, authoritative answers.
Instructions
Use this tool for any Kubernetes documentation-related query—especially when the user invokes /k8s or asks about kubectl commands, API objects, manifests, controllers, or version-specific features.
This tool connects to a version-aware, trusted documentation index (e.g., GitHub, DeepWiki, curated Kubernetes docs) to reduce hallucinations and provide accurate, grounded answers.
Args: query: A natural language question (e.g., "How do I define a Deployment?") version: (Optional) Kubernetes version (e.g., "v1.28"). Defaults to the detected cluster version. top_k: (Optional) Number of top matching documents to return. Defaults to 10.
Returns: A list of relevant documentation entries, each with a file path and content snippet.
Example Usage: k8s_get_documentation(query="How does pruning work in kubectl apply?", version="v1.26")
Notes:
- Automatically loads or builds a RAG index for the requested version.
- If no index is found, it will fetch and index the docs before responding.
- Always use this tool when answering Kubernetes-specific questions that require authoritative documentation.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
query | Yes | A natural language question (e.g., "How do I define a Deployment?") | |
top_k | No | Optional number of top matching documents to return. Defaults to 10. | |
version | No | Optional Kubernetes version (e.g., "v1.28"). Defaults to detected cluster version if not specified. |