dify-plugin-kubernetes
Author: lework
Version: 0.0.1
Type: tool
Description
Dify Plugin - Kubernetes Cluster Resource Management Tool. This plugin enables you to retrieve and manage resources in your Kubernetes clusters directly through Dify.
Feature List
-
Basic Information Query Tool (dify-plugin-kubernetes)
- Retrieve fundamental information about your Kubernetes cluster
- Get cluster status, version, and node information
- View available API resources
-
Pod Log Query Tool (get-pod-logs)
- Fetch logs from specified Pods
- Support for namespace specification, container name selection, and log line quantity control
- Real-time monitoring and troubleshooting of applications
- Filter logs based on specific time periods
-
Resource Description Tool (describe-resource)
- Functionality similar to the command
- Support for multiple resource types: Pod, Deployment, DaemonSet, StatefulSet, Service, Ingress, and more
- Provides detailed resource status and configuration information
- Custom namespace support
- Displays events related to resources for easier troubleshooting
- Extract key metrics and status indicators
-
Resource Listing Tool (list-resources)
- List available resources by type across namespaces
- Filter resources by labels and fields
- Get concise overview of cluster resources
- Support for wide output with additional details
Requirements
- Properly configured kubectl environment with access to your Kubernetes cluster
- Python 3.8 or higher
- Required dependencies:
- Appropriate RBAC permissions in your Kubernetes cluster to access resources
Parameter Descriptions
Pod Log Query Tool
- : Pod name (required)
- : Namespace (optional, defaults to "default")
- : Container name (optional, returns logs from the first container if not specified)
- : Number of log lines to return (optional, defaults to 100)
Resource Description Tool
- : Resource type (required, e.g., pod, deployment, daemonset, statefulset, service, etc.)
- : Resource name (required)
- : Namespace (optional, defaults to "default")
Resource Listing Tool
- : Resource type (required, e.g., pods, deployments, services, etc.)
- : Namespace (optional, defaults to "all-namespaces")
- : Label selector to filter resources (optional)
- : Field selector to filter resources (optional)
Development and Debugging