This project exposes service IP as node port as following
* FTP: 30080
* Minecraft: 31111
* Prometheus: 30900
* Exporter for Prometheus: 31225
* Grafana: 30300
Loadbalancer or Ingress can be used with proper configuration as well
-
Download and install a few CLI tools and the Kubernetes Service plug-in.
$ curl -sL https://ibm.biz/idt-installer | bash
-
Config local environment to use IKS
$ ibmcloud ks cluster-config --cluster <cluster-name>
To get a detailed info, visit https://www.ibm.com/cloud/container-service
-
Make helm account and init
$ kubectl create serviceaccount --namespace kube-system tiller $ kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller $ helm init --service-account tiller --upgrade
-
Make PV and PVC
$ cd <root>/k8s-minecraft $ kubectl apply -f minecraft.pv.yaml $ kubectl apply -f minecraft.pvc.yaml
-
Install MCS (spigot)
$ cd <root>/ $ helm install k8s-minecraft/helmchart/k8s-minecraft --name overworld
This FTP service uses same volume that is assigned by above PVC
-
Make secret for ftp user and password
$ kubectl create secret generic mysecret --from-literal=ftpuser=<user-name> --from-literal=ftppassword=<user-password>
-
IP configuration for using
PASSIVE MODE
Change
PASV_ADDRESS
inftp-deployment.yaml
to properEXTERNAL-IP
that can be retrieved via$ export EXTERNAL_IP=`kubectl get node -o=jsonpath='{.items[0].status.addresses[?(@.type=="ExternalIP")].address}'`
-
Deploy ftp service
$ cd <root>/kubernetes-ftp $ cat ftp-deployment.yaml | sed 's/\<EXTERNAL_IP\>/'$EXTERNAL_IP'/' | kubectl apply -f - $ kubectl apply -f ftp-service.yaml
-
Install basic Prometheus Operator set
$ cd <root>/monitoring $ kubectl apply -f bundle.yaml
-
Install Prometheus Server and Grafana
$ kubectl apply -f prometheus-server.yaml -f grafana.yaml
- Upload
./monitoring/plugins/minecraft-prometheus-exporter-1.2.0.jar
toplugins
folder through FTP Service - Restart MCS is mandatory to be applied
- Go to
Configuration > Data Sources
, then clickAdd Data Sources
- Select
Prometheus
- Enter the URL of Prometheus at
url
field - Click
Save & Test
to test
- Copy the content in
./monitoring/grafana-dashboard/minecraf-server-dashboard.json
- Go to
Create > Import
- Paste at
Or paste JSON
area then clickLoad
This dashboard needs more load to the machine. Recommend not to use under small size machine
- change
individual-player-statistics
to true inconfig.yml
placed in plugins folderport: 9225 individual-player-statistics: true
- Copy the content in
./monitoring/grafana-dashboard/minecraf-players-dashboard.json
- Go to
Create > Import
- Paste at
Or paste JSON
area then clickLoad