Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to use itzg/minecraft with GeyserMC? #213

Open
FawenYo opened this issue Jun 9, 2024 · 1 comment
Open

Possible to use itzg/minecraft with GeyserMC? #213

FawenYo opened this issue Jun 9, 2024 · 1 comment

Comments

@FawenYo
Copy link
Contributor

FawenYo commented Jun 9, 2024

Hi! I'm trying to deploy the Minecraft server (JAVA edition) and install GeyserMC on it so other devices like iOS with Minecraft Bedrock version can also connect to my server, and here is my overrides YAML

# ref: https://hub.docker.com/r/itzg/minecraft-server/
minecraftServer:
  eula: "TRUE"
  # This can be one of "VANILLA", "FORGE", "SPIGOT", "BUKKIT", "PAPER", "FTBA", "SPONGEVANILLA", "CURSEFORGE"
  type: "PAPER"

  serviceType: ClusterIP

  pluginUrls: [https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/spigot, https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot]

  extraPorts:
    - name: bedrock-v4-tcp
      containerPort: 19132
      protocol: TCP
      service:
        enabled: true
        embedded: true
        annotations: {}
        type: ClusterIP
        loadBalancerIP: ""
        loadBalancerSourceRanges: []
        externalTrafficPolicy: Cluster
        port: 19132
      ingress:
        ingressClassName: nginx
        enabled: false
        annotations:
    - name: bedrock-v4-udp
      containerPort: 19132
      protocol: UDP
      service:
        enabled: true
        embedded: true
        annotations: {}
        type: ClusterIP
        loadBalancerIP: ""
        loadBalancerSourceRanges: []
        externalTrafficPolicy: Cluster
        port: 19132
      ingress:
        ingressClassName: nginx
        enabled: false
        annotations:
    - name: bedrock-v6-tcp
      containerPort: 19133
      protocol: TCP
      service:
        enabled: true
        embedded: true
        annotations: {}
        type: ClusterIP
        loadBalancerIP: ""
        loadBalancerSourceRanges: []
        externalTrafficPolicy: Cluster
        port: 19133
      ingress:
        ingressClassName: nginx
        enabled: false
        annotations:
    - name: bedrock-v6-udp
      containerPort: 19133
      protocol: UDP
      service:
        enabled: true
        embedded: true
        annotations: {}
        type: ClusterIP
        loadBalancerIP: ""
        loadBalancerSourceRanges: []
        externalTrafficPolicy: Cluster
        port: 19133
      ingress:
        ingressClassName: nginx
        enabled: false
        annotations:

I've added the GeyserMC to minecraftServer.pluginUrls[0] and added necessary ports under minecraftServer.extraPorts. Since I have limited IP, I choose to use CluserIP as Kubernetes Service type and use Krelay to do port-forwarding as bedrock requires UDP protocol.

kubectl relay -n minecraft service/minecraft-minecraft --address 0.0.0.0 25565:minecraft
kubectl relay -n minecraft service/minecraft-minecraft --address 0.0.0.0 19132:bedrock-v4-tcp
kubectl relay -n minecraft service/minecraft-minecraft --address 0.0.0.0 19132:bedrock-v4-udp@udp

I tested the server with Java edition and it did the work. However, my iOS devices just can't connect to it... Want to ask if someone here also tried GeyserMC with ClusterIP before?

@llajas
Copy link

llajas commented Aug 2, 2024

Hi,

While I haven't used the plugin approach for Geyser (This is actually the first I'm seeing this, wasn't even aware this was possible), I've ran Geyser successfully as an external helm chart without issue and I've just recently converted it to a sidecar deployment under this chart if you need to use it for reference.

Part of getting Geyser to connect to your Java server is to specify in the Geyser's config.yaml file the IP/hostname for your Java server. I'm doing this by utilizing the DNS name of the service for the Java server so it'll always be pointed at the proper IP. I'm not sure how you specify this in the plugin approach, unfortunately but I just wanted to mention that it is possible.

Hope this helps. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants