Prevent your K8s-managed Minecraft server from shutting down when players are connected.
  • Rust 76.1%
  • Dockerfile 12.7%
  • Makefile 11.2%
Find a file
Renovate Bot b8b551ae69
All checks were successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pull_request_closed/build Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/cron/build Pipeline was successful
chore(deps): update rust crate anyhow to v1.0.103
2026-06-25 21:20:18 +00:00
.woodpecker chore(deps): update woodpeckerci/plugin-kaniko docker tag to v2.3.2 2026-06-06 15:19:23 +00:00
src Simplify initial last has players logic 2025-06-19 14:03:11 -04:00
.gitignore Initial commit 2025-06-19 01:40:16 -04:00
Cargo.lock chore(deps): update rust crate anyhow to v1.0.103 2026-06-25 21:20:18 +00:00
Cargo.toml fix(deps): update rust crate kube to v4 2026-06-16 17:35:21 +00:00
Containerfile chore(deps): update docker.io/library/rust:1.96.0-alpine docker digest to f87aa87 2026-06-16 05:08:11 +00:00
LICENSE.md Initial commit 2025-06-19 01:40:16 -04:00
Makefile Use fuwafuwalabs project for container 2025-06-27 11:19:27 -04:00
README.md Add min players options to readme 2025-06-19 16:26:37 -04:00
renovate.json renovate: automerge lockFileMaintenance 2026-03-26 10:36:46 -04:00

minecraft-pdb-mgr

minecraft-pgb-mgr watches a Minecraft server for connected players and updates a Kubernetes PodDisruptionBudget to prevent server shutdowns when players are connected.

How?

Deploy minecraft-pdb-mgr to your cluster (only one replica is needed) and set the following environment variables:

  • POD_NAMESPACE - the namespace the pod runs in. You should use valueFrom.fieldRef.fieldPath: metadata.namespace for this.
  • RUST_LOG (optional) - the log level (i.e. info, debug,, warn, error)
  • UPDATE_INTERVAL - how often in seconds to check for players and to patch the PDB. The default value is 10.
  • PDB_NAME - the name of the PBB object in the same namespace as the pod to update. You need to create this PDB yourself.
  • SERVER_HOST - the hostname or IP address of the Minecraft server to monitor.
  • SERVER_PORT - the port of the Minecraft server to monitor.
  • MIN_PLAYERS - the minimum number of online players to consider when updating the PDB. Default is 1.
  • MIN_PLAYERS_PERCENT - a floating point value (0.0 - 1.0) representing the percent of online players to the maximum number of players to consider when updating the PDB. This takes precedence over MIN_PLAYERS.

License

See LICENSE.md.