diff --git a/docs/data-sources/builtin-toolsets/kubernetes.md b/docs/data-sources/builtin-toolsets/kubernetes.md index c61c9cf2d3..28d000adf3 100644 --- a/docs/data-sources/builtin-toolsets/kubernetes.md +++ b/docs/data-sources/builtin-toolsets/kubernetes.md @@ -1,13 +1,15 @@ -# Kubernetes Toolsets +# Kubernetes -## Core ✓ +## Toolsets + +### Core !!! info "Enabled by Default" This toolset is enabled by default and should typically remain enabled. By enabling this toolset, HolmesGPT will be able to describe and find Kubernetes resources like nodes, deployments, pods, etc. -### Configuration +**Configuration:** ```yaml holmes: @@ -16,22 +18,15 @@ holmes: enabled: true ``` -### Capabilities +**Capabilities:** | Tool Name | Description | |-----------|-------------| -| kubectl_describe | Run kubectl describe command on a specific resource | -| kubectl_get_by_name | Get details of a specific resource with labels | -| kubectl_get_by_kind_in_namespace | List all resources of a given type in a namespace | -| kubectl_get_by_kind_in_cluster | List all resources of a given type across the cluster | -| kubectl_find_resources | Search for resources matching a keyword | -| kubectl_get_yaml | Get YAML definition of a resource | -| kubectl_events | Get events for a specific resource | -| kubectl_memory_requests_all_namespaces | Get memory requests for all pods across all namespaces in MiB | -| kubectl_memory_requests_namespace | Get memory requests for all pods in a specific namespace in MiB | -| kubernetes_jq_query | Query Kubernetes resources using jq filters | - -## Logs ✓ +| kubernetes_jq_query | Query Kubernetes resources using jq filters with pagination | +| kubernetes_tabular_query | Extract specific fields from resources in tabular format with optional filtering | +| kubernetes_count | Count Kubernetes resources matching a jq filter | + +### Logs !!! info "Enabled by Default" This toolset is enabled by default. You do not need to configure it. @@ -40,7 +35,7 @@ By enabling this toolset, HolmesGPT will be able to read Kubernetes pod logs. --8<-- "snippets/toolsets_that_provide_logging.md" -### Configuration +**Configuration:** ```yaml holmes: @@ -49,23 +44,27 @@ holmes: enabled: true ``` -### Capabilities +**Capabilities:** | Tool Name | Description | |-----------|-------------| | kubectl_logs | Fetch logs from a specific pod | | kubectl_logs_all_containers | Fetch logs from all containers in a pod | -| kubectl_previous_logs | Fetch previous logs from a pod | -| kubectl_previous_logs_all_containers | Fetch previous logs from all containers in a pod | +| kubectl_previous_logs | Fetch previous logs from a crashed pod | +| kubectl_previous_logs_all_containers | Fetch previous logs from all containers in a crashed pod | +| kubectl_container_previous_logs | Fetch previous logs from a specific container in a crashed pod | | kubectl_container_logs | Fetch logs from a specific container in a pod | | kubectl_logs_grep | Search for specific patterns in pod logs | | kubectl_logs_all_containers_grep | Search for patterns in logs from all containers | -## Live Metrics +### Live Metrics + +!!! note "Not Enabled by Default" + This toolset is only available when `kubectl top` is supported (requires [Metrics Server](https://github.com/kubernetes-sigs/metrics-server)). This toolset retrieves real-time CPU and memory usage for pods and nodes. -### Configuration +**Configuration:** ```yaml holmes: @@ -74,62 +73,62 @@ holmes: enabled: true ``` -### Capabilities +**Capabilities:** | Tool Name | Description | |-----------|-------------| | kubectl_top_pods | Get current CPU and memory usage for pods | | kubectl_top_nodes | Get current CPU and memory usage for nodes | -## Prometheus Stack +### Kube Prometheus Stack -This toolset fetches Prometheus target definitions. Requires specific cluster role rules. +!!! note "Not Enabled by Default" + This toolset must be explicitly enabled. -### Configuration +This toolset uses `kubectl` to proxy into a Prometheus service running in-cluster and fetch target definitions. This is different from the [Prometheus toolset](prometheus.md), which connects directly to a Prometheus server for metrics querying. + +**Configuration:** ```yaml holmes: toolsets: - kubernetes/prometheus_stack: + kubernetes/kube-prometheus-stack: enabled: true - customClusterRoleRules: - - apiGroups: ["monitoring.coreos.com"] - resources: ["servicemonitors", "podmonitors", "prometheusrules"] - verbs: ["get", "list"] ``` -### Capabilities +**Capabilities:** | Tool Name | Description | |-----------|-------------| -| kubectl_get_prometheus_targets | Get Prometheus monitoring targets | -| kubectl_get_service_monitors | Get ServiceMonitor resources | -| kubectl_get_pod_monitors | Get PodMonitor resources | +| get_prometheus_target | Fetch the definition of a Prometheus target via kubectl proxy | + +### Resource Lineage -## Resource Lineage Extras +!!! note "Not Enabled by Default" + This toolset must be explicitly enabled. Requires [kube-lineage](https://github.com/tohjustin/kube-lineage) installed either via `kubectl krew` or built from source. -Two variations of resource lineage toolsets: one native and one using kubectl krew. Provides tools to fetch children/dependents and parents/dependencies of Kubernetes resources. +Provides tools to fetch children/dependents and parents/dependencies of Kubernetes resources. Two variations are available depending on how kube-lineage is installed. -### Configuration +**Configuration:** ```yaml holmes: toolsets: - kubernetes/resource_lineage_extras: + kubernetes/kube-lineage-extras: enabled: true - # OR - kubernetes/resource_lineage_extras_krew: + # OR if installed via krew: + kubernetes/krew-extras: enabled: true ``` -### Capabilities +**Capabilities:** | Tool Name | Description | |-----------|-------------| | kubectl_lineage_children | Get child/dependent resources of a Kubernetes resource | | kubectl_lineage_parents | Get parent/dependency resources of a Kubernetes resource | -## Adding Permissions for Additional Resources (In-Cluster Deployments) +## Adding Permissions for Additional Resources !!! note "In-Cluster Only" This section applies only to HolmesGPT running **inside** a Kubernetes cluster via Helm. For local CLI deployments, permissions are managed through your kubeconfig file.