# local-k8s-ai-agent

A self-hosted, read-only AI agent for Kubernetes that answers questions using a local Mistral model through Ollama and reasons about a cluster's actual live pods, events, and logs rather than generic advice.

local-k8s-ai-agent is a hands-on starting point for DevOps and platform engineers to see what an AI agent for Kubernetes actually does before adopting a commercial provider. It runs entirely on local hardware using Mistral 7B through Ollama, so no API keys are needed and no cluster data leaves the environment, and it reads live pods, events, and logs to answer questions about the cluster's real state rather than generic explanations.

The agent uses a dedicated service account with read-only get and list permissions, so it can observe but never modify the cluster regardless of what the model suggests. It exposes a browser chat UI and a REST API with ask and diagnose endpoints, and the project is deployed through GitHub Actions building multi-architecture images with ArgoCD and ArgoCD Image Updater handling GitOps promotion and cluster synchronization.

Website: https://github.com/MaryamTavakkoli/local-k8s-ai-agent
