kubernetes-minecraft-server icon indicating copy to clipboard operation
kubernetes-minecraft-server copied to clipboard

Configuration Changes To Deploy to GKE

Open omriyo opened this issue 3 years ago • 8 comments

Hey, made a few changes and tested it on my GKE account:

  1. removed the volume in order for GKE to assign a persistent volume by itself.
  2. added a storage class instead of the volume
  3. change the service from node port to load balancer since the node ip isn't fixed
  4. added update strategy to solve a locked file bug when 2 pods are trying to run the server simultaneously
  5. removed node from the values file
  6. changed some of the resources requests to match the machine I chose.

I created a GKE standard cluster with a single n1-standard-4 node in order to have some breathing room in regards to resources. I chose preemptible nodes in order to reduce costs. So far it's looking good. Will update if I encounter any bugs

omriyo avatar Apr 13 '22 16:04 omriyo

I'm doing some parallel work around this area (hosting a minecraft server in GKE) and would love to work together with you on this!

cnorling avatar Apr 18 '22 00:04 cnorling

I don't see volume.path from the values yaml digested anywhere, is it used?

cnorling avatar Apr 18 '22 00:04 cnorling

@salineselin I am letting the GKE decide where to place the volume. I am only giving it the volume claim. So far it works, I am now working on making it work when using pre-emptible nodes.

omriyo avatar Apr 18 '22 09:04 omriyo

I'm not merging yet because I'm working on a fix for preemptible nodes. Since the node is changing I probably need to use stateful set for the volumes to transfer properly to the new node. Will update as soon as I'll have the fix

omriyo avatar Apr 18 '22 20:04 omriyo

Oh wow somehow I didn't find this before, but it might be a good source of information for running minecraft in kubernetes with Helm. https://github.com/itzg/docker-minecraft-server

cnorling avatar Apr 18 '22 23:04 cnorling

hi y'all. I think we need to leave the volume in for people who are not running on GKE. There must be a way to add these changes and make them some kind of configuration value in the helm chart. Any ideas?

solarhess avatar Apr 26 '22 21:04 solarhess

Since there are different files needed, I think it's best to keep branches in the repo for local deployment and GKE deployment. There is an option of adding a flag in the values file to let helm know if it needs to process certain files

omriyo avatar Apr 27 '22 12:04 omriyo