Running a server on Kubernetes & Preemptable Instances

Hi there.

I am currently working on a server configuration to take advantage of Google Cloud’s Kubernetes Engine atop of Preemptable Instances. In a nutshell, I’m running a Minecraft server that, after 24 hours or less, will cut off without warning and restart.

I have a disk mounted, ready to go. However, I want to prevent data corruption as this server will be heavily modded. Unlike my old instance, I don’t have any warning at all as to when this will shut down. Only the ability to send commands via cron if I need.

So, I want to know, is there a plugin or a certain configuration that could allow me to have the server be ready for an immediate shutdown? Or should I just keep safe-off and run manual saves every 30 minutes and have everything in memory?

Edit: Need to do more research, but, if this is a thing for a preemptable state of pods, how do I capture SIGTERMs?

Minecraft - and especially mods - are not designed to anticipate unexpected shutdown. I think the best thing to try is to regularly save-all, and immediately copy the world to a backup folder. That way, if the world becomes corrupt, you can restore a recent known good copy.

1 Like