Agentic-Kubernetes-CLI
by andersoncarmona913
Overview
Translates natural language prompts into executable kubectl commands for Kubernetes cluster management.
Installation
python agent.pyEnvironment Variables
- BEDROCK_MODEL_REGION
- BEDROCK_MODEL_ID
Security Notes
The MCP server directly executes 'kubectl' commands generated by the AI agent based on user input. While 'shlex.split' is used to mitigate basic shell injection, the 'validate_kubectl_command' function in 'k8s_cli_mcp_server.py' explicitly allows dangerous 'delete', 'drain', and 'cordon' operations to 'pass' without actual validation or user confirmation by the tool itself. The system relies on the LLM's prompt to 'confirm the command with the user first' for destructive operations, which is not a robust security mechanism. A confused or malicious LLM could issue highly destructive commands without sufficient guardrails, posing a significant risk to the Kubernetes cluster.
Similar Servers
mcp-server-kubernetes
This MCP server enables AI agents to connect to and manage Kubernetes clusters by executing kubectl and Helm commands.
kubernetes-mcp-server
Facilitates AI agent interaction with Kubernetes and OpenShift clusters by exposing management and observability tools via the Model Context Protocol.
mcp-k8s-go
This MCP server enables interaction with Kubernetes clusters to list, get, apply, and execute commands on various resources through a conversational interface.
aks-mcp
The AKS-MCP server acts as a bridge, enabling AI assistants to interact with and manage Azure Kubernetes Service (AKS) clusters and related Azure resources.