Server
| API version | kobblestone.io/v1alpha1 |
|---|---|
| Kind | Server |
| Scope | Namespaced |
| kubectl | kubectl get servers |
A Server runs a single Minecraft server.
The server is based on the itzg/minecraft-server image and runs as a StatefulSet with one replica. The operator also manages its Service, RCON Secret and NetworkPolicy and, if configured, its PersistentVolumeClaim, Route and TCPRoute.
Servers can be backed up with Backups and restored with Restores if they have storage configured.
spec
accessobjectConfigures the whitelist and the operators of the server.
2 fields
opsobjectConfigures the operators of the server.
1 field
users[]stringPlayers with operator permissions, as usernames or UUIDs.
Note: The operators are synchronized: players not listed here lose their operator permissions.
whitelistobjectConfigures the whitelist. Only whitelisted players can join.
autoCommandsobjectCommands executed via RCON on certain events. Each entry is a single command.
5 fields
onConnect[]stringCommands executed when a player connects.
onDisconnect[]stringCommands executed when a player disconnects.
onFirstConnect[]stringCommands executed when the first player connects to the empty server.
onLastDisconnect[]stringCommands executed when the last player disconnects.
onStartup[]stringCommands executed once the server has started.
autoSleepobjectConfigures putting the server to sleep while no players are online.
2 fields
modestringHow the server sleeps while no players are online.
Default is Pause.
Values:
None: The server never sleeps.Pause: The server pauses ticking while it is empty (requires Minecraft 1.21.2 or later).Hibernate: The server is stopped while it is empty and started again when a player connects through aRouter.LegacyPause: The server process is paused while it is empty, using the autopause feature of the image. For older versions.
- One of:
None,Pause,Hibernate,LegacyPause
timeoutSecondsint32Time in seconds without players after which the server goes to sleep.
Default is 60.
- Minimum: 1
contentobjectConfigures plugins, mods, modpacks and other content installed on startup.
9 fields
curseForgeobjectConfigures content from CurseForge.
3 fields
apiKeySecretRefobjectReference to a key of a Secret containing a CurseForge API key. Required to download from CurseForge.
files[]stringCurseForge projects or files to install, by slug, ID or URL.
modPackUrlstringURL of the CurseForge page of a modpack to install. Requires the server type AutoCurseforge.
iconUrlstringURL of an image used as the server icon.
modPackUrlstringURL of a modpack ZIP file to install.
modrinthobjectConfigures content from Modrinth.
1 field
projects[]stringModrinth projects to install, by slug or ID.
packwizUrlstringURL of a packwiz pack.toml to install.
plugins[]objectPlugins to install, for server types that support plugins (e.g. Paper).
1 field
URL of the plugin .jar file.
resourcePackobjectConfigures a resource pack that players are prompted to download.
spigotResources[]stringIDs of Spigot resources to install.
Whether you accept the Minecraft EULA. The server does not start unless this is true.
forwardingobjectConfigures the server to accept players forwarded by a Velocity proxy (modern forwarding). The server then runs in offline mode and trusts the player information sent by the proxy.
Supported server types: Paper, Pufferfish, Purpur, Folia (built in), Fabric and Quilt (installs FabricProxy-Lite and Fabric API from Modrinth). For other types, it is ignored and the server keeps verifying players itself.
Warning: For Paper-based servers, config/paper-global.yml is managed by Kobblestone and replaced on every start. Changes to it on the server’s volume are lost.
Note: Set and managed by the Network for its managed servers.
jvmobjectConfigures the JVM of the server.
2 fields
memoryobjectConfigures memory settings for the JVM.
1 field
heapPercentageint32Configures the percentage of memory reserved for the heap.
Default is 75.
Note: For low-memory servers, you might have to lower this.
- Minimum: 1
- Maximum: 99
versionstringConfigures a specific version of the JVM to be used.
Default is java25.
Note: This corresponds to the Java part of the server image tag. See Image tags.
lifecycleobjectConfigures settings related to the lifecycle of the Server.
1 field
rolloutPolicystringSpecifies when changes to spec are rolled out to running servers.
Default is Immediate.
Values:
Immediate: Changes tospecare rolled out immediately. For example, if you updatespec.version, the server will be restarted.Manual: Changes tospecare rolled out when the serverPodis recreated, e.g. when the server is stopped and started again or thePodis deleted. Note: This does not apply to restarts of the server container after a crash.
- One of:
Immediate,Manual
networkPolicyobjectConfigures the NetworkPolicy of the server.
By default, it only allows Minecraft traffic from Routers, Networks and Bots, RCON traffic from Backups, and all traffic to the Service if it is of type LoadBalancer.
2 fields
disabledbooleanIf set to true, the server’s default NetworkPolicy will not be created.
Default is false.
extraIngressRules[]objectAdditional Ingress rules applied to the policy.
2 fields
from[]object3 fields
namespaceSelectorobjectpodSelectorobjectofflinebooleanIf set to true, the server runs in offline mode: player accounts are not verified.
Default is false.
Warning: Only use this for servers behind a proxy that verifies players (e.g. a Network), never for servers that players can reach directly.
podobjectConfigures the server Pod.
9 fields
affinityobjectAffinity of the server Pod.
3 fields
nodeAffinityobject2 fields
1 field
nodeSelectorTerms[]objectpodAffinityobject2 fields
2 fields
podAffinityTermobject6 fields
labelSelectorobjectmatchLabelKeys[]stringmismatchLabelKeys[]stringnamespaceSelectorobjectnamespaces[]stringtopologyKeystringweightint326 fields
labelSelectorobjectmatchLabelKeys[]stringmismatchLabelKeys[]stringnamespaceSelectorobjectnamespaces[]stringtopologyKeystringpodAntiAffinityobject2 fields
2 fields
podAffinityTermobject6 fields
labelSelectorobjectmatchLabelKeys[]stringmismatchLabelKeys[]stringnamespaceSelectorobjectnamespaces[]stringtopologyKeystringweightint326 fields
labelSelectorobjectmatchLabelKeys[]stringmismatchLabelKeys[]stringnamespaceSelectorobjectnamespaces[]stringtopologyKeystringenv[]objectAdditional environment variables of the server container.
Can be used to set any option of the image that is not covered by the Server spec.
3 fields
namestringvaluestringvalueFromobjectimagestringCustom image for the server container.
Default is itzg/minecraft-server with the Java version of spec.jvm.version.
imagePullPolicystringImage pull policy of the server container.
nodeNamestringName of the node the server Pod is scheduled on.
nodeSelectormap[string]stringNode selector of the server Pod.
tolerations[]objectTolerations of the server Pod.
volumeMounts[]objectAdditional volume mounts of the server container.
8 fields
bindMountOptions[]stringmountPathstringmountPropagationstringnamestringreadOnlybooleanrecursiveReadOnlystringsubPathstringsubPathExprstringvolumes[]objectAdditional volumes of the server Pod.
31 fields
awsElasticBlockStoreobjectazureDiskobjectazureFileobjectcephfsobjectconfigMapobjectcsiobject5 fields
driverstringfsTypestringnodePublishSecretRefobject1 field
namestringreadOnlybooleanvolumeAttributesmap[string]stringdownwardAPIobject3 fields
defaultModeint32defaultUserint64ephemeralobject1 field
volumeClaimTemplateobject2 fields
metadataobjectspecobject9 fields
accessModes[]stringdataSourceobjectdataSourceRefobjectselectorobjectstorageClassNamestringvolumeModestringvolumeNamestringflexVolumeobjectflockerobjectgcePersistentDiskobjectgitRepoobjectimageobjectiscsiobject11 fields
chapAuthDiscoverybooleanchapAuthSessionbooleanfsTypestringinitiatorNamestringiqnstringiscsiInterfacestringlunint32portals[]stringreadOnlybooleantargetPortalstringnamestringpersistentVolumeClaimobjectphotonPersistentDiskobjectportworxVolumeobjectprojectedobject3 fields
defaultModeint32defaultUserint64sources[]object6 fields
clusterTrustBundleobject6 fields
labelSelectorobjectnamestringoptionalbooleanpathstringsignerNamestringuserint64configMapobjectdownwardAPIobjectpodCertificateobject8 fields
certificateChainPathstringcredentialBundlePathstringkeyPathstringkeyTypestringmaxExpirationSecondsint32signerNamestringuserint64userAnnotationsmap[string]stringsecretobjectserviceAccountTokenobjectrbdobjectscaleIOobject10 fields
fsTypestringgatewaystringprotectionDomainstringreadOnlybooleansslEnabledbooleanstorageModestringstoragePoolstringsystemstringvolumeNamestringsecretobjectstorageosobjectvsphereVolumeobjectpropertiesmap[string]stringAdditional entries for server.properties.
See server.properties for available properties.
rconobjectConfigures RCON, the remote console of the server.
RCON is required for Commands, CommandGroups, autoCommands and online Backups.
3 fields
disabledbooleanIf set to true, RCON is disabled.
Default is false.
Note: Commands, CommandGroups, autoCommands and online Backups require RCON.
passwordSecretRefobjectReference to a key of a Secret containing the RCON password.
If not set, a random password is generated.
Note: Only read when the server’s own Secret is created.
portint32Port of RCON on the server’s Service. Inside the Pod, RCON always listens on 25575.
Default is 25575.
resourcesobjectCompute resources of the server container.
routeobjectConfigures a Route that makes the server reachable through a Router under a hostname.
Removing it deletes the Route.
serviceobjectConfigures the Service of the server.
5 fields
annotationsmap[string]stringAnnotations added to the server’s Service, e.g. to configure a load balancer.
externalTrafficPolicystringExternal traffic policy of the server’s Service.
ipFamilyPolicystringIP family policy of the server’s Service.
portint32Port on the Service that exposes Minecraft.
Default is 25565.
typestringType of the server’s Service, e.g. ClusterIP or LoadBalancer.
Default is ClusterIP.
Warning: With LoadBalancer, the RCON port is reachable from anywhere as well, unless RCON is disabled.
statestringDesired state of the Server.
Default is Running.
Values:
Running: The server is started.Stopped: The server is stopped. Its data is kept.
Note: The server is kept stopped while a Restore or an offline Backup of it is running.
- One of:
Stopped,Running
storageobjectConfigures a persistent volume for the server’s data (worlds, configuration, …).
Without storage, all data is lost when the server Pod is recreated, and Backups and Restores are not supported.
Warning: Removing storage deletes the server’s PersistentVolumeClaim and thus its data.
2 fields
Size of the PersistentVolumeClaim, e.g. 10Gi.
Note: Increasing the size requires a storage class that supports volume expansion.
storageClassNamestringStorage class of the PersistentVolumeClaim.
Default is the default storage class of the cluster.
Note: Only applied when the claim is created.
tcpRouteobjectConfigures an optional TCPRoute exposing the Servers Minecraft port.
Note: Using TCPRoute requires at least Gateway API v1.6.0 to be installed on your cluster.
1 field
parentRefs[]objectReferences to gateways the TCPRoute should attach to.
timeoutsobjectConfigures the health checks of the server.
2 fields
Maximum time in seconds the server may take to start before it is restarted.
Default is 360. Must be a multiple of 5.
typestringType of the server software, e.g. a mod loader or plugin platform.
Default is Vanilla.
See Server types for details on each type.
- One of:
Vanilla,Bukkit,Spigot,Fabric,Forge,Magma,Ketting,Mohist,Catserver,Spongevanilla,Limbo,Crucible,Paper,Pufferfish,Purpur,Folia,Quilt,AutoCurseforge
Minecraft version of the server.
Use LATEST for the latest release or SNAPSHOT for the latest snapshot.
status
addressstringIP address of the Server’s Service. External addresses are preferred: the IP assigned by a load balancer, then the first of externalIPs, then the cluster IP.
conditions[]objectConditions of the Server.
Types: Running, Stopped, Progressing, Hibernating, RconAvailable, BackupInProgress, RestoreInProgress, Error.
6 fields
lastTransitionTimestring- Format:
date-time
messagestringobservedGenerationint64reasonstringstatusstringtypestringphasestringCurrent phase of the Server.
Values:
Stopped: The server is stopped.Starting: The server is starting.Running: The server is running and ready for players.Stopping: The server is stopping.Hibernating: The server was stopped by auto-sleep and is started again when a player connects.
- One of:
Stopped,Running,Starting,Stopping,Hibernating
tcpRoutebooleanWhether a managed TCPRoute exists.
typestringType of the server software, see spec.type.
- One of:
Vanilla,Bukkit,Spigot,Fabric,Forge,Magma,Ketting,Mohist,Catserver,Spongevanilla,Limbo,Crucible,Paper,Pufferfish,Purpur,Folia,Quilt,AutoCurseforge