开源软件名称(OpenSource Name):solarhess/kubernetes-minecraft-server开源软件地址(OpenSource Url):https://github.com/solarhess/kubernetes-minecraft-server开源编程语言(OpenSource Language):Smarty 100.0%开源软件介绍(OpenSource Introduction):Minecraft Server in KubernetesThis demonstrates how to run Minecraft in Kubernetes. It builds on the work of the itzg Minecraft Server Docker Image to create a docker container in kubernetes. We also use Helm to make installation, and customization, a breeze. This repository demonstrates how to run in a local kubernetes cluster using local disks. How To InstallPrerequisites
Step 1: Create a directory for local filesSSH to one of the nodes in your kubernetes cluster. Create a directory where you want Minecraft files to exist. Example: ssh your_kubernetes_host
sudo mkdir -p "/mnt/local-volumes/minecraft"
sudo chmod 777 "/mnt/local-volumes/minecraft" Get the kubernetes node name name of the host machine on which you just added the directory. Edit values.yaml. Update Line 7 to your node's hostname. If you used a different path for your worldfile, update volume.path in values.yaml. Step 2: Configure your Minecraft ServerThe itzg Minecraft Server Docker Image allows you to configure settings in the minecraft server by setting environment variables. You can edit helm/minecraft/deployment.yaml to add or change environment variables for your purposes. See lines 30-35 for examples. See the minecraft-server docker image page for documentation on configuring your server. We've included just a couple of the most common configurations in values.yaml like gamemode, message of the day, and port. Step 3: Adjust portChoose one of these two options:
Note: You may need to open the port if your host system has a firewall installed. Step 4: Helm installNow, apply the configuration to Kubernetes. helm install minecraft helm/minecraft --namespace minecraft --create-namespace Step 5: ConnectSuppose that your kubernetes node has a public ip address of 192.168.1.203. If you chose option 1 in Step 3 then you do not need to specify a port when connecting to your server. For this example you would only need to connect to Othherwise, when you configure your minecraft server, connect to Invitation to HelpRunning on GKE: If anyone is interested in figuring this out the details to make this work on Google Cloud GKE or Azure AKS, please send me a PR. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论