kubectl-ai CLI
An AI assistant for Kubernetes that turns plain-language requests into kubectl operations and doubles as an MCP server
- 7,597 ★ on the repository
- Last commit
- Apache-2.0
Broad access
Why this level
- Runs kubectl and bash commands against the cluster
- Can modify resources, production included
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/kubectl-aiDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- Runs kubectl and bash commands against the cluster
- Can modify resources, production included
This is third-party code. Review the repository files before installing.
What it does
kubectl-ai takes a request like "how is nginx doing in my cluster", runs the needed kubectl commands, reads the output and answers. It works interactively or in quiet mode for scripts, and also installs as the kubectl ai plugin. It supports Gemini, Vertex AI, OpenAI, Azure OpenAI, Grok, Bedrock and local models via Ollama and llama.cpp. With --mcp-server it exposes its kubectl tools to other MCP clients, and with --external-tools it also proxies tools from other MCP servers.
Who it is for. For DevOps engineers and developers who operate Kubernetes clusters.
Good fit when
- You need a quick read on cluster state without typing command after command
- You want to give Claude or Cursor kubectl access via MCP
- You need a Kubernetes assistant on a local model
Not a fit when
- kubectl and cluster access are not configured
- The model must not get write access to a production cluster
Example request
Check the logs of the nginx app in the hello namespace and tell me why pods keep restartingLimitations
kubectl must be installed and configured. The CLI needs a model provider key, Gemini by default, which is not reachable from Russia without a VPN; local models via Ollama work. The HTTP MCP mode has no auth by default: anyone who reaches the port can run kubectl and bash, so enable OAuth 2.1 for non-local access.
How to disable. Remove the kubectl-ai binary from PATH or run kubectl krew uninstall ai, and delete the kubectl-ai block from the MCP config.
FAQ
Does MCP server mode need a model key?
In basic mode the server exposes kubectl tools to the client, and the client's own model does the reasoning.
Can it run without the cloud?
Yes, via --llm-provider ollama or llama.cpp.
Discussion
No questions or reviews yet.
Related
CLI toolsMCP server for Kubernetes: the agent reads cluster state, diagnoses pod failures and runs operations through kubectl
Kubernetes MCP
MCP Server Kubernetes
MCP server for managing a Kubernetes cluster through kubectl and Helm, with a non-destructive mode
A Go MCP server for Kubernetes: read any cluster resource and pod logs, with apply and exec in write mode
A CLI and Kubernetes controller for developing, building and deploying MCP servers. For platform teams, written in Go
A Go MCP server for Kubernetes and OpenShift: resources, pods, logs, Helm and Tekton straight through the cluster API
An open-source Kubernetes UI with a built-in MCP server: the agent inspects the cluster, diagnoses breakages and operates it with RBAC in mind
README in short
The README covers installation via script, manually, via krew and Nix, and setup for various model providers. It explains the config file, built-in tools, Docker usage and MCP client mode. A separate section covers MCP server mode, HTTP transport and OAuth 2.1 auth. Apache-2.0 licensed.