helmcode

Kubectl AI — DevOps skill for Claude Code

DevOps community

Kubectl plugin for AI-assisted Kubernetes cluster management.

How to install Kubectl AI

This entry records only its repository, not the path inside it, so there is no exact command to give. Open helmcode/kubectl-ai and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Kubectl AI does

Kubectl plugin for AI-assisted Kubernetes cluster management.

Alternatives in DevOps

  • Kubernetes 71.9k ★
  • Kubeshark — Cluster-wide network observability for Kubernetes 11.8k ★
  • Skypilot — Run, manage, and scale AI workloads on any AI infrastructure 9.7k ★

README

🤖 kubectl-ai

**AI-powered Kubectl Plugin for Kubernetes cluster management.**

`kubectl ai` is a Kubernetes plugin that leverages LLM models to analyse your cluster resources and give you clear, actionable troubleshooting advice – right in your terminal.


Why kubectl-ai?

  • Root-cause analysis – stop guessing why your deployment is broken.
  • Actionable fixes – concrete kubectl / helm commands you can copy-paste.
  • Understands the whole picture – pods, deployments, services, CRDs, ingresses…
  • Human or machine output – pretty terminal format, or JSON / YAML for automation.
  • Multiple LLM providers – supports Claude (Anthropic) and OpenAI models.
  • Metrics analysis – visual charts and AI-powered insights from Prometheus data.
  • Scaling recommendations – intelligent HPA and KEDA configuration suggestions.

⚡ Quick start

1. Prerequisites

  • Go 1.21+
  • An API key for your chosen LLM provider:
    • Claude (Anthropic): ANTHROPIC_API_KEY
    • OpenAI: OPENAI_API_KEY
  • Access to the cluster you want to debug (via kubectl context)
# For Claude (default)
export ANTHROPIC_API_KEY="sk-..."

# For OpenAI
export OPENAI_API_KEY="sk-..."
export LLM_PROVIDER="openai"  # Optional: auto-detects from API key

📦 Install

A) Build from source

git clone https://github.com/helmcode/kubectl-ai.git
cd kubectl-ai
# build the binary for your OS/ARCH
GOOS=$(uname -s | tr '[:upper:]' '[:lower:]') \
GOARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') \
go build
# add it to PATH
sudo mv kubectl-ai /usr/local/bin/

B) Download a pre-compiled release

Grab the appropriate archive from the [Releases page](https://github.com/helmcode/kubectl-ai/releases) – e.g.:

OS=$(uname -s | tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
curl -LO "https://github.com/helmcode/kubectl-ai/releases/latest/download/kubectl-ai-${OS}-${ARCH}