Quick Start¶
Create your first Minecraft server with plugins using Minecraft Operator.
Create a Namespace¶
Create a namespace for your Minecraft server:
Create RCON Secret¶
Create a secret for RCON password (used for graceful shutdown):
kubectl create secret generic my-server-rcon \
--namespace minecraft \
--from-literal=password=your-secure-password
Create a PaperMCServer¶
Create a file my-server.yaml:
apiVersion: mc.k8s.lex.la/v1alpha1
kind: PaperMCServer
metadata:
name: my-server
namespace: minecraft
labels:
environment: production
spec:
# Use constraint solver to pick best version for plugins
updateStrategy: "auto"
# Check for updates daily, apply on Sundays
updateSchedule:
checkCron: "0 3 * * *"
maintenanceWindow:
enabled: true
cron: "0 4 * * 0"
# Graceful shutdown via RCON
gracefulShutdown:
timeout: 300s
rcon:
enabled: true
passwordSecret:
name: my-server-rcon
key: password
# Pod resources
podTemplate:
spec:
containers:
- name: minecraft
resources:
requests:
memory: "2Gi"
limits:
memory: "4Gi"
Apply the manifest:
Verify Server Creation¶
Check the PaperMCServer status:
Expected output:
Check the created resources:
# StatefulSet
kubectl get statefulset my-server --namespace minecraft
# Pod
kubectl get pods --namespace minecraft
# Service
kubectl get svc my-server --namespace minecraft
Add a Plugin¶
Create a file essentials-plugin.yaml:
apiVersion: mc.k8s.lex.la/v1alpha1
kind: Plugin
metadata:
name: essentialsx
namespace: minecraft
spec:
source:
type: hangar
project: "EssentialsX/Essentials"
# Always use latest compatible version
updateStrategy: "latest"
# Match servers with environment=production label
instanceSelector:
matchLabels:
environment: production
Apply the plugin:
Verify Plugin¶
Check the Plugin status:
Expected output:
The plugin will be downloaded and installed during the next maintenance window, or immediately if you restart the server.
Connect to Your Server¶
Get the server's external IP or use port-forward:
# Port forward for local testing
kubectl port-forward svc/my-server 25565:25565 --namespace minecraft
Connect with your Minecraft client to localhost:25565.
View Logs¶
Check server logs:
Access Web UI¶
If Web UI is enabled, port-forward to view the dashboard:
Open http://localhost:8082/ui in your browser.
Next Steps¶
- Configuration — Learn about all CRD options
- Update Strategies — Understand version management
- Troubleshooting — Common issues and solutions