Quickstart
This guide gets you from zero to a running Minecraft server on Kubernetes in under five minutes. It assumes you have a working Kubernetes cluster and kubectl configured.
-
Install the CRD
Apply the
MinecraftServerCustom Resource Definition to your cluster:Terminal window kubectl apply -f https://raw.githubusercontent.com/danihengeveld/mc-operator/main/manifests/crd/minecraftservers.yaml -
Install the operator with Helm
Terminal window helm install mc-operator oci://ghcr.io/danihengeveld/charts/mc-operator \--version 1.0.0 \--namespace mc-operator-system \--create-namespaceWait for the operator to be ready:
Terminal window kubectl rollout status deployment/mc-operator -n mc-operator-system -
Create a namespace for your servers
Terminal window kubectl create namespace minecraft -
Deploy a Paper server
Terminal window cat <<EOF | kubectl apply -f -apiVersion: mc-operator.dhv.sh/v1alpha1kind: MinecraftServermetadata:name: my-servernamespace: minecraftspec:acceptEula: trueserver:type: Paperversion: "1.20.4"jvm:initialMemory: "1G"maxMemory: "2G"resources:cpuRequest: "500m"memoryRequest: "2Gi"memoryLimit: "2Gi"storage:size: "10Gi"EOF -
Watch the server provision
Terminal window kubectl get minecraftservers -n minecraft -wYou will see the phase progress through
Pending → Provisioning → Running. The first startup takes a few minutes as the server jar is downloaded. -
Connect to your server
For a ClusterIP service (the default), use
kubectl port-forwardto test connectivity:Terminal window kubectl port-forward svc/my-server 25565:25565 -n minecraftOpen Minecraft, add a server at
localhost:25565, and connect.
Next steps
Section titled “Next steps”- Read the full CRD reference to explore all configuration options.
- See example configurations for common server setups.
- Set up production webhooks for full admission control.