Training a Token DevOps Engineer

By Daniel Samson · 2026-11-26

Learning to make your own language model from scratch is fun! It is a very different experience compared to building software. It is still an iterative process but the focus is largely around creating the high quality training data, measuring and reducing the noise of the training data, training the model then validating how well the model predicts content it has never seen.

First, You need to have a clear goal:

"I want to make a small domain-specific model that is capable of managing my Kubernetes cluster."

Sounds simple right? It's actually a lot more than you think. For example: what does the term "managing" in this context actually mean. Isn't Kubernetes supposed to manage itself?

Lets try again:

"I want to make a small domain-specific model, which is less than 1 billion parameters, where I can ask the model via an agent harness:

  1. To detect issues within a Kubernetes cluster via events being fired or periodically checking the cluster.

  2. To analyse logs on Loki and the metrics on Prometheus.

  3. To create new deployments.

  4. To update existing deployments.

  5. To deprecate and decommission old deployments.

  6. To resolve issues autonomously.

  7. To manage the source of truth using a git repository of yaml configuration files and Markdown documentation.

  8. To manage a key vault of secrets in a secure way.

The model doesn't need to have great general knowledge like a fully capable frontier large language model. Instead, it needs to be a domain expert in Kubernetes, proficient in basic shell scripting, and monitoring Linux. In order for the model to be useful, the model needs to be able to make tool calls. It needs to have some amount of thinking, reasoning and decision making capability. Some basic arithmetic knowledge is also needed but it doesn't have to be a maths Olympiad. It may need to be able to handle long contexts (up to 64K tokens), in order to resolve complicated issues or issues that have many symptoms.

Ideally, I want the model to be small enough to run on a dedicated Raspberry PI 5 with 16GB of memory, perhaps with a AI HAT + 2. I want to keep the electric costs to a minimum hence the Raspberry PI. So 100-800M parameters would be the ideal size.

This model is good enough model, not a super intellectual one. A model that can respond to issues quickly and keep the uptime of the deployments it manages."

Working out Training Data

Now we are getting somewhere. We have a goal that can shape our future decisions! The next step is the decisions around making the training data:

The Pre-training Goal is to build the models vocabulary and train it to autocomplete prose:

  • Build a corpus of modern general English from Wikipedia's articles.

  • Build a corpus of technical documentation needed to manage Kubernetes and related services such as Traefik, Fleet, Git, Gitea, Wrangler CLI etc.

The Post Training Goal is to fine tune the models behaviour, so that accomplishes our goal definition:

  • Build a corpus of scenarios the model is likely to see in production.

  • Build curriculum corpus to teach the model basic arithmetic and reasoning based of nouns related to computing terms like ip addresses, nodes, pods, deployments, namespaces ect.

  • Build a tool call and MCP corpus.

Next up: Pre-training our Token DevOps Engineer