TL;DR: Click both "apply" buttons below and have a running factorio server
Factorio 0.17 is here, and you need a server for you and your friends to play on. You also want to run it for free, on the latest, most resilient infrastructure. If so, this tutorial is for you. At the end, you'll have a working factorio server, running on Kubernetes.
The content below is editable! Feel free to modify any of the values before applying.
We'll begin by configuring a PersistentVolumeClaimA PersistentVolumeClaim is a request for storage - it asks the Kubernetes Cluster for a particular type of storage which it can use as a Volume.Read More... which is a request for storage. For this demo, we'll configure a small claim for 20mb, or enough storage to run a factorio game for a few days worth of play.
Once you've applied the volume claim config, the second resource is the DeploymentIn Kubernetes, a Deployment is an object which describes how an application is deployed. A Deployment defines the images to launch, how to configure them, and how they should be deployedRead More.... This is the configuration that tells Kubernetes which Docker image to run (in our case the excellent factorio server by dtanderson). As recommended from the image's documentation page, we'll mount the volume via
mountPath: /factorio so the saves persist between game server restarts. We also configure it with a maximum of 128Mb of memory, and 1 CPU — enough to fit within the free tier on KubeSail.
Once applied, you will need to expose your deployment to the internet. Open up your deployments dashboard and click the
Expose to Internet (TCP) button. Once you do, you'll get the full address (hostname and port) which you can connect to from your factorio client!
In our PersistentVolumeClaimA PersistentVolumeClaim is a request for storage - it asks the Kubernetes Cluster for a particular type of storage which it can use as a Volume.Read More... YAML, you'll notice we set our storage request to 20Mb - KubeSail's free tier hosting is limited to 25Mb, which will serve you well for a while - but a well-loved factorio map can exceed that size! We offer 32Gb of expandable storage on our hobby tier, starting at $7! See our pricing page for more.