Over the weekend I discovered this really cool Github project by Paolo Mainardi called additronk8s which is a retro DOS game engine (using DOSBox) built as a Kubernetes (K8s) custom controller and implemented in Javascript. Having spent quite a bit of time last year building out our VMworld 2019 demo which ran a number of MSDOS games on ESX 3.0 running on VMware Cloud on AWS, I definitely had to give this project a try!
In addition to having some fun playing with K8s, this solution was also quite interesting from the techniques that were used, here is a description from Paolo's own words:
One of the goal of this project was to use just Kubernetes API without any external dependency (neither the storage), in fact is noteworthy that ConfigMaps are (ab)used as a persistent storage layer, using a simple technique of split/merge parts of files to save the games.
After poking around the repository, I found that it was not very intuitive to get started. In fact, it took me some time to figure out everything and lots of trial/error. I eventually got everything working and successfully deployed several DOS games to my Tanzu Kubernetes Grid (TKG) Cluster which I had running in my homelab. Below are the detailed instructions on how to quickly get this solution stood up which just requires a vanilla K8s deployment.