Skip to content

About

Minecraft dedicated game server cluster hosting solution using GKE and Agones

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

44 Commits

Folders and files

Repository files navigation

Installation

Prerequisites

1. Create public DNS Zone

gcloud dns managed-zones create agones-minecraft \ # Any name
    --description="agones-mc-dns-controller managed DNS zone" \
    --dns-name=<DOMAIN> \ # Domain that you own
    --visibility=public

Point domain to Google nameservers

gcloud dns managed-zones describe agones-minecraft

2. Create Kubernetes Cluster

gcloud container clusters create minecraft --cluster-version=1.18 \
  --tags=mc \
  --scopes=gke-default,"https://www.googleapis.com/auth/ndev.clouddns.readwrite" \ # GKE scope needed for Cloud DNS
  --node-labels=agones-mc/domain=<DOMAIN_NAME> \ # Replace with the domain for the zone that the controller will manage
  --num-nodes=2 \
  --no-enable-autoupgrade \
  --machine-type=n2-standard-4
gcloud config set container/cluster minecraft
gcloud container clusters get-credentials minecraft
gcloud compute firewall-rules create mc-server-firewall \
  --allow tcp:7000-8000 \
  --target-tags mc \
  --description "Firewall rule to allow mc server tcp traffic"

3. Install Agones

kubectl create namespace agones-system
kubectl apply -f https://raw.githubusercontent.com/googleforgames/agones/release-1.13.0/install/yaml/install.yaml

4. Verify Agones

kubectl describe --namespace agones-system pods

5. Install Custom Minecraft DNS Controller

 sed 's/<MANAGED_ZONE>/agones-minecraft/' https://raw.githubusercontent.com/saulmaldonado/agones-minecraft/main/k8s/agones-mc-dns-controller.yaml | kubectl apply -f - # agones-minecraft matches the name of zone created earlier

6. Deploy Minecraft GameServer Fleet

sed 's/<DOMAIN_NAME>/example.com/' k8s/mc-server-fleet.yml | kubectl apply -f - # replace 'example.com' with the domain you will be using

7. List Minecraft GameServer Addresses

kubectl get gs -o jsonpath='{.items[*].metadata.annotations.agones-mc/externalDNS}'

About

Minecraft dedicated game server cluster hosting solution using GKE and Agones

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages