Back to Home
andersoncarmona913 icon

Agentic-Kubernetes-CLI

by andersoncarmona913

Overview

Translates natural language prompts into executable kubectl commands for Kubernetes cluster management.

Installation

Run Command
python agent.py

Environment 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

Stats

Interest Score0
Security Score3
Cost ClassMedium
Avg Tokens750
Stars0
Forks0
Last Update2026-01-19

Tags

KubernetesCLIAI AgentNatural Language ProcessingDevOps