Introduction
mc-operator is a production-grade Kubernetes Operator for managing Minecraft server deployments. It is built with .NET 10 and KubeOps 10, and is maintained under the dhv.sh umbrella.
What problem does it solve?
Section titled “What problem does it solve?”Running a Minecraft server on Kubernetes without an operator means manually writing and maintaining StatefulSets, Services, PersistentVolumeClaims, ConfigMaps, and webhook configs — then keeping them all consistent across environments. This is error-prone and tedious.
mc-operator turns server administration into a single Kubernetes resource:
apiVersion: mc-operator.dhv.sh/v1alpha1kind: MinecraftServermetadata: name: paper-survival namespace: minecraftspec: acceptEula: true server: type: Paper version: "1.20.4" jvm: initialMemory: "2G" maxMemory: "4G" storage: size: "20Gi"The operator takes care of the rest: provisioning storage, configuring the server, exposing it on the network, and continuously reconciling the desired state.
Supported server distributions
Section titled “Supported server distributions”| Type | Description |
|---|---|
Vanilla | Official Mojang server jar |
Paper | High-performance Paper fork — recommended for production |
Spigot | Spigot with Bukkit API support |
Bukkit | CraftBukkit server |
All distributions are backed by the community-standard itzg/minecraft-server Docker image, which handles version management and configuration via environment variables.
Key capabilities
Section titled “Key capabilities”- CRD-driven:
MinecraftServeris a first-class Kubernetes resource with a typed spec and status. - Cluster management:
MinecraftServerClustermanages multiple backend servers behind a Velocity proxy with automatic server registration and forwarding secret management. - Admission webhooks: A validating webhook rejects invalid configurations before they reach the cluster. A mutating webhook applies sensible defaults.
- Safe data handling: PVCs are retained by default when a server is deleted, preventing accidental data loss.
- Zero-downtime version upgrades: When
spec.prePull: trueis set and a server version is changed, the operator pre-pulls the new container image and pre-downloads the Minecraft server jar to the data volume while the server is still running. The rolling update then only waits for the server process to start — not for any downloads. - Pause/resume: Set
spec.replicas: 0to pause a server and retain all world data. Set back to1to resume. - Status reporting: The operator continuously reports the server’s phase (
Pending,Provisioning,Running,Paused,Failed), connection endpoint, and PVC status. - Leader election: Deploy multiple operator replicas safely using built-in leader election.
- Helm chart: Clean, versioned Helm chart published to GHCR as an OCI artifact.
What it is not
Section titled “What it is not”mc-operator is a lifecycle manager — it manages server infrastructure, not game content. It does not:
- Install or manage plugins
- Handle automated world backups
- Provide RCON command routing
These are intentional scope decisions. See the Roadmap for future plans.