mode: self-hosted user: yousaf-hamza runtime: minikube (local) llm: ollama / local
yousaf@platform-copilot: ~
$ whoami
Yousaf Hamza — Senior DevOps / Platform Engineer
$ cat about.md
A RAG assistant that answers questions from your own
documents. Fully self-hosted — nothing leaves your cluster.

Platform Copilot

A self-hosted Retrieval-Augmented Generation (RAG) assistant built to answer questions from your own documents — vector search, a local LLM, and a chat frontend, all running on your own minikube cluster. Built as a learning project to understand RAG pipelines end to end. This demo runs on general knowledge (time zones, geography, weather) so it's easy to try — swap in your own documents once it's running.

$ cat README.md

What this actually is

Most knowledge worth having lives scattered across documents, wikis, and notes. Platform Copilot is a small, fully self-hosted pipeline that lets you ask plain-English questions about a set of documents and get an answer grounded only in what's actually written there — with the source file cited, so you can verify it rather than trust it blindly.

Everything runs inside your own cluster: the embedding model, the vector database, and the LLM itself. No document content or query text is sent to any third-party API — which matters if what you're indexing is sensitive. The demo on this page uses general knowledge instead of anything private, precisely so it's safe to try from a public page.

This repo ships with five general knowledge example documents (time zones & UTC, world capitals & geography, weather basics, unit conversions, and solar system facts) so you can try the whole pipeline immediately — then swap in your own docs. The pipeline itself doesn't care what the content is about; it works the same way for internal runbooks, product documentation, research notes, or anything else you point it at.

$ cat architecture.md

How it fits together

documents/*.md │ ▼ Ingestion Job ──(chunk + embed, sentence-transformers)──▶ Qdrant (vector DB) ▲ │ similarity search your question ──▶ RAG API (FastAPI) ─────────────────────────────┘ │ ▼ Ollama (local LLM) ──▶ answer + cited source(s)

Ask a question → it's embedded with the same model used at ingestion time → the closest-matching document chunks come back from Qdrant → those chunks + your question are handed to a local LLM with instructions to answer only from that context → you get an answer plus exactly which file(s) it came from.

$ ./run-it-yourself.sh --target minikube

Run it on your own minikube

This is the condensed version — the repo's README.md has the full walkthrough, troubleshooting, and a re-ingestion script for adding your own docs later.

01

Start minikube & point Docker at it

Give it enough headroom to run three services comfortably.

minikube start --cpus=4 --memory=8192
eval $(minikube docker-env)
02

Build the images locally

docker build -t devops-rag-api:local ./app/rag_api
docker build -t devops-rag-ingest:local ./app/ingestion
03

Deploy the core services

kubectl apply -f k8s/00-namespace.yaml
kubectl apply -f k8s/01-qdrant.yaml
kubectl apply -f k8s/02-ollama.yaml
kubectl apply -f k8s/03-rag-api.yaml
kubectl -n devops-rag exec deploy/ollama -- ollama pull llama3.2:1b
04

Ingest the sample documents

kubectl create configmap sample-docs -n devops-rag \
  --from-file=sample-docs/ --dry-run=client -o yaml | kubectl apply -f -
kubectl apply -f k8s/04-ingestion-job.yaml
kubectl -n devops-rag logs -f job/ingest-runbooks
05

Port-forward the backend — that's it

You don't need to deploy anything else in-cluster. This page can act as your frontend directly — just expose rag-api:

kubectl -n devops-rag port-forward svc/rag-api 8000:8000

Then use the "Try it live" widget below, pointed at http://localhost:8000 — no nginx, no extra Deployment, no second port-forward.

Optional: if you'd rather run the chat UI in-cluster too (e.g. to share a single URL with a teammate on your network instead of using this public page), the repo's frontend/ folder and k8s/05-frontend.yaml cover that — see the main README.md, step 6, Option B. Not needed for using this page.

$ curl -X POST /query

Try it against your own local instance

This page is static and hosted on GitHub Pages — it has no backend of its own. With rag-api port-forwarded per step 5 above, the widget below talks to your local instance directly from this page — this page is the frontend, no separate deployment needed.

platform-copilot / chat
Ask a question once your local instance is running:

Note: browsers separately restrict a public https:// page from reaching a private address like http://localhost under a policy called Private Network Access — this is different from ordinary CORS. rag-api already sends the header this requires, but enforcement still varies by browser/version. If the status dot won't turn green even with the port-forward confirmed running, that's most likely why — running this same index.html locally (see docs/PAGES.md) avoids the restriction entirely, since it's no longer a cross-origin request at all.