- Learnwithdevopsengineer
- Posts
- I finally built the AI tool I’ve always wanted (100th video!)
I finally built the AI tool I’ve always wanted (100th video!)
A local-first AI CLI that understands your Kubernetes needs — and writes the YAML for you, no cloud required
💥 The Problem
Writing Kubernetes YAML is repetitive, time-consuming, and easy to mess up.
Even simple tasks — like exposing a service or scaling a deployment — require copy-pasting boilerplate YAML or flipping between docs.
What if you could just describe what you want… and let AI write the YAML for you?
🛠️ What I Built
For my 100th YouTube video, I built a lightweight CLI tool called kubectl-ai-lite
.
It takes natural language, generates Kubernetes YAML using a local AI model, and lets you apply it directly using kubectl
.
No OpenAI.
No cloud.
No YAML by hand.
✅ Stack:
Python – CLI + logic
Mistral LLM via Ollama – local AI model
kubectl – applies the generated manifest to your cluster
Docker Desktop – runs the single-node Kubernetes cluster
⚙️ How It Works
1️⃣ You type a natural language prompt:Deploy nginx with 2 replicas and expose it on port 80
2️⃣ The prompt is sent to your local Mistral model
3️⃣ It generates clean Kubernetes YAML
4️⃣ The script prints the YAML and asks:
“Apply this to your cluster?”
→ Hit y
and it’s live via kubectl apply -f -
All in under 30 seconds.
💡 Why This Matters
Tired of writing YAML? Now you don’t have to.
Building a lab or test app? Do it faster.
Working in an air-gapped environment? No cloud needed.
Want to learn Kubernetes YAML? This shows you what AI would write.
This isn't just a cool hack — it's a step toward how DevOps tools will work with local AI support in the future.
📥 Want the Code?
I’m sharing it only with subscribers.
Sign up and you’ll get access in the welcome email:
👉 learnwithdevopsengineer.beehiiv.com
🎥 See It in Action
👉 Watch the full demo on YouTube:
How I Built an AI Tool That Writes Kubernetes YAML (100% Local)
Thanks for being part of the journey — this is just the beginning.
— [Your Name]