DEV Community

loading...
Balconygames

Why I am using Kubernetes for game dev?

oivoodoo profile image Alexandr K Updated on ・2 min read

Hi everyone.

It's a really nice time to publish the new post about the new area that I am trying to learn and build something exciting. Let's say #gamedev was always the goal when I started to learn software development but for some reasons, I was always busy with other stuff.

OK, no more talks about the past.
Kubernetes is really exciting technology that I discovered when I was a solo developer for my projects on backend and frontend.

My current stack is

  • DigitalOcean is hosting platform with reasonable pricing that's always helping for my indie projects. I want to say thank you to the company because they are always opened to help, add some credits and reduce prices.
  • Containership.io is a really nice platform to provision Kubernetes to DigitalOcean. (don't have any credits from these guys but the platform helped me to save my time). DigitalOcean started to provide Kubernetes out of the box but I found it hard to use for the beginner. Talking about the pods, services, SSL certs setup. Probably it's only about my experience, had the luck to make it done easily when I have full access to Kubernetes.
  • Kubernetes, it's not about microservices. It's Heroku for you when you can control anything with simple recipes.
  • Gitlab is source control platform with free container registry per repository.

My cluster hosts:

It costs me about $40 per month (3 nodes by 10$ and 1 Node Balancer) is really cheap for these machines.

My workflow as a solo developer on the backend.

  • Make the code changes.
  • Rebuild the image and push to Gitlab registry
  • kubectl apply -f recipe/<name of the app>/deployment.yml that's containing <image_name>:latest or <image_name>:$COMMIT_TAG

The next step to move it away from my local machine and use Gitlab pipelines.
It's easy to support, deploy and don't waste time.

In a case, in one day it would require to setup Redis or other databases I will use helm tool with predefined recipes to create pods, services, and deployment for Redis.

Our game is Sweety Jumper

Discussion (2)

pic
Editor guide
Collapse
bgadrian profile image
Adrian B.G.

I would drop the containers for static websites and use GitLab pages (or something similar), less services to worry.

Also u say 3 replicas but you have 3 nodes entirely hmm. I hope you did not put the database in K8s 🤔

Collapse
oivoodoo profile image
Alexandr K Author

Hey Adrian. Don't see any issues with database in k8s. Why don't I need to use it there? You don't know our metrics, I would say now it's ok, later I would need to have more nodes, more performance. for database I have persisted volume, provisioned in digitalocean. it would become so easy to migrate just in case because everything stored.

it's good point about gitlab pages, didn't try to do it. not sure how easy it would be automate the changes deployment. Going to check it out.