Playing Kubernetes

Playing Kubernetes

We needed to set up an infrastructure for our new service at Money Forward. One of the tasks was to create a Kubernetes config to run our application. At that time I didn't have much experience with this tool, so I decided to learn more about it. To explore new technology, I often try to create something with it. That's how I came up with the idea of the Kubernetes factory. The main concept was simple - to implement some part of the game Factorio, but using Kubernetes. Here's how I did it:

  • each building was a separate container inside Kubernetes
  • containers communicated with each other to transfer resources.

Here is an example of this game:

A player has placed an iron mine on the map at row 2 and column 2. Iron mines produce iron each second and if possible, send a GRPC message that represents iron to the next container. In this example, there is a belt container located next to the iron mine. The belt container's only function is to receive resources, store them, and then send them to the next container if possible.

This is how iron and coal reach the furnace, which can process them into an Iron Plate(IR_PL), as you can see on the screenshot.

Here is what it looked like inside Kubernetes:

Github repo

It was fun to play with Kubernetes, and I believe it is a beautiful and well-designed system.

Next time I may try to play with Winglang or Pulumi.


要查看或添加评论,请登录

社区洞察

其他会员也浏览了