Recently I rebuilt the three Raspberry Pi cluster on my desk, and the whole platform took about a day. Git history says more than 60 commits between the evening of 15 November and the evening of 16 November 2026, with a sleep in the middle. I did not type most of the commands. An AI coding agent (omp, running Claude) did the typing, and I did the deciding.
This is the last post in the Raspberry Co-PI-lot series, a sequel to my 2020 Arc on Raspberry Pi post and my 2021 Okta and kubectl post. Parts 1 to 8 are listed at the bottom if you are joining late.
This post will cover how the work was split, the habits that made it safe, the mistakes (including one I would rather not talk about), and what I would tell a team doing infrastructure work this way. Let’s dive in!
How it actually worked
Think of a very fast, very eager junior engineer who never tires of SSH. I described what I wanted in plain English in a terminal on my Mac. The agent ran the commands on the Pis, wrote the manifests and the docs, committed and pushed.
I made the calls on scope, money, anything touching Azure, and policy questions. The agent asked before anything destructive or anything that cost money. For example, it did not get my sudo password. I enabled passwordless sudo on the nodes myself, and I accepted that risk knowingly rather than hand over a credential.
Research was the other big win. When I asked a question like "what are my options for a gateway in front of LLMs?", the agent fanned the work out to sub-agents. Each one wrote a cited report that landed in the repo under docs/research/. I got sources to click through instead of a confident paragraph from nowhere.
I also interrupted constantly, and that was a feature. A few of my favourites:
- Mid-install of MicroK8s 1.30, because that was what the guide said: "if there is a more recent version of microk8s, we should be using that!" The agent purged it and installed 1.36.
- When the agent proposed a 20 Gi volume: "try 10 unless you have a good reason to request 30% of my sdcard".
- When it asked whether to switch a storage account to locally redundant storage: "GRS is fine, no need to swap to LRS".
None of those are clever. They are judgement calls that come from knowing what the thing is for.
What made it go well
A handful of habits did nearly all the work.
Git as the single source of truth
Once Flux was in place (Part 2), the rule became simple: change the repo, not the cluster. The agent’s work was reviewable as commits, and anything it did by hand showed up as drift. That beats scrollback in a terminal as an audit trail.
Written rules the agent actually reads
The repo has an AGENTS.md, a file of guidance for AI coding agents (and, as its own header says, a checklist for humans too). The hard rules in mine include things like:
- Never commit plaintext secrets.
- Node-level changes go one node at a time, with a health check between nodes.
- Never re-run
microk8s enable ingress, because it resets Traefik to defaults that cannot work on this kernel (Part 5). - No changes to Azure without my explicit request.
- Verify after every change, and do not claim success without evidence.
Note: Almost every rule is a scar, written the moment something bit me so the next session would not repeat it. Rule 17, about the host firewall, is the one I like least, and I will come back to it.
Canary first, then everyone
Whenever a change touched the nodes (the proxy mode, the API server flags, the Entra config, the firewall), the agent started on one node, checked it and then did the others. With three-node dqlite, two down means no API, so this one was non-negotiable.
Test it, don’t believe it
The best moments were the boring tests. A baseline probe pod showed the router web UI, router DNS and node SSH all reachable from inside the cluster. After the network guard went in, the same probe showed them blocked while DNS and the internet still worked. Secrets encryption was proven by finding a marker secret in plaintext in the datastore files before and not after. Backups were proven by downloading the tarball and comparing hashes. The Key Vault half of my secrets setup was proven by decrypting with the age key deliberately missing.
In my opinion, that is the value. An agent that says "done" is worth nothing. An agent that says "done, and here is the probe that shows the before and after" is worth a lot.
What went wrong
The agent was wrong several times, and so was I.
The Calico crashloop
Part 6 has the full story, so here is the short version. I added a host firewall for the nodes. Every test passed: ports from my Mac, pods, a reboot of a node. Around seven hours later I noticed calico-node was crashlooping on every node.
I told the agent: "looks like calico is in a crashloop, I am fixing with another agent unless you tell me you caused it?" The reply was direct: "Yes, I caused it." The policy also applied to loopback, so Calico’s own liveness check against localhost:9099 was being dropped. The existing network dataplane kept working, which is exactly why every functional test passed. About 118 restarts per node had piled up.
The fix was one line, adding 127.0.0.0/8 to the allowed networks. The agent first checked the repo for changes from the other agent I had running, so the two did not trample each other. Then it watched calico-node for 14 to 16 minutes with no restarts.
The agent verified the things the change was meant to protect, and not the thing the change had touched. Restarts appear only after liveness probes start failing, so a check straight after rollout proves nothing. That is now a rule in AGENTS.md: after any firewall change, watch calico-node for 10 minutes.
Be warned: A confident "all checks passed" is only as good as the checks. I have made exactly the same mistake by hand, many times. The agent just made it faster.
The single sign-on dead end
I wanted the Bifrost dashboard behind Entra single sign-on (Part 8). The agent assumed that a proxy injecting an authentication header would be enough, and went down that path. When I tried it I saw a login prompt, not a proxied session. I told it exactly that: I was not seeing the proxy present the password, I was being challenged with a login prompt.
It turned out the dashboard only trusts its own session cookie and ignores the Authorization header. I decided to drop Entra and keep a password in Key Vault. That was a human call about what is good enough for a home lab, and I am comfortable with it. The wrong assumption was the agent’s, but the decision to stop digging was mine.
Small wrong things, caught by testing
A few smaller ones, because they add up:
- The agent wrote a comment saying Traefik’s redirect was a 308. A real request showed 301, and it corrected the comment.
- Research claimed the gateway could run without its SQLite store. Testing showed file-only mode crashes when budgets are on.
- I had asked about the "18 month support window" for Kubernetes minor releases. The agent corrected me: roughly 14 months (12 plus 2), and it built the monthly version check around that.
- A docs sub-agent wrote "verified" next to claims it had not verified. I had to send it back.
- My laptop died twice mid-change. Each time the agent rebuilt its picture from
git status, the cluster and Azure, and carried on. One of those was half way through the Bifrost revert: the Entra cleanup was done, the Key Vault delete had timed out and the manifests were uncommitted.
That last one is a good argument for Git and for infrastructure that can be inspected. State lived in the repo and the systems themselves, not in the agent’s head, so a restart cost minutes.
Where the human still matters
My view after this build is that the agent is fast at execution and decent at research, and it needs a person at the decision points. Mine were:
- Money. The $100 cap on LLM spend (Part 8) was mine. So was keeping GRS storage when the agent asked whether to switch it to LRS.
- Policy. Whether I could route my Claude subscription through a gateway was not a technical question. Research said Anthropic’s usage policy did not allow it, so I used a workspace API key and the plan’s included API credit instead. Read the terms yourself before you take an agent’s summary as legal advice.
- Risk acceptance. Passwordless sudo and a break-glass admin certificate are trade-offs. I accepted them and wrote them down.
- What "good enough" means. It is a lab on my desk. I want it patched and hardened, not a bank.
- Noticing. I spotted the crashloop, not the agent. I had no alerting on it, and that is a gap I now know about.
The catch: an agent produces plausible, tidy-looking work quickly, and the polish can hide a wrong assumption for hours if nobody checks.
Food for thought for teams
If you are thinking about using an agent for infrastructure work, here is what I would take from my day:
- Put the state in Git and make the agent work through it. You get review, history and recovery for free.
- Write the rules down and keep adding to them. An
AGENTS.mdis cheap, and every incident is a new rule. - Make it ask before it spends or deletes. Make the rule explicit, and keep Azure changes behind a human request.
- Demand evidence, not claims. Ask for the test, the before and after, and the hash comparison. Then ask what the change might have broken that the test does not cover.
- Watch longer than the probe period. Slow failures hide behind quick checks.
- Keep a human on money and policy. Those are the two things an agent cannot be accountable for.
None of that is new. It is just good change management for a very fast colleague. The agent compressed a lot of work into a day, but it did not remove the need for judgement. It moved the judgement to review time.
I would do it again, and next time I would write the "watch it for 10 minutes" rule before the incident.
Wrapping Up
Three Pis, more than 60 commits, roughly 24 hours, and about 2.8 GB of memory left per node with everything running. A good chunk of it was me saying "no, try this instead". Thanks for following along.
As always, feel free to reach out with any questions or comments!
The full series
This is the final part of the series. The full list:
- Rebuilding My Desk Kubernetes Cluster, Five Years On
- GitOps and Secrets with Flux and SOPS
- Workload Identity Without AKS
- Entra ID for kubectl, Five Years After Okta
- Ingress, Certificates and Getting Home Through CGNAT
- Hardening a Home Cluster, and How I Broke It
- Keeping It Patched Without Babysitting It
- One LLM Gateway for Everything, with a Hard $100 Cap
- What I Learnt Building It with an AI Agent (this post)
Until next time, stay cloudy!