From 24cdbe9bf5fae88d76252add1b4ba0f8a7d48697 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lo=C3=AFc=20Blot?= Date: Sat, 15 Dec 2018 15:12:40 +0100 Subject: [PATCH] Add a basic kubernetes deployment file (#7979) * Add a basic kubernetes deployment file --- README.md | 2 ++ misc/kubernetes.yml | 53 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 misc/kubernetes.yml diff --git a/README.md b/README.md index a54a915ed..c0160ca00 100644 --- a/README.md +++ b/README.md @@ -481,6 +481,8 @@ Data will be written to `/home/minetest/data` on the host, and configuration wil Note: If you don't understand the previous commands, please read the official Docker documentation before use. +You can also host your minetest server inside a Kubernetes cluster. See our example implementation in `misc/kubernetes.yml`. + Version scheme -------------- diff --git a/misc/kubernetes.yml b/misc/kubernetes.yml new file mode 100644 index 000000000..1a956abe9 --- /dev/null +++ b/misc/kubernetes.yml @@ -0,0 +1,53 @@ +--- +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + app: minetest + name: minetest + namespace: default +spec: + selector: + matchLabels: + app: minetest + template: + metadata: + labels: + app: minetest + spec: + containers: + - image: registry.gitlab.com/minetest/minetest/server:master + name: minetest + ports: + - containerPort: 30000 + protocol: UDP + volumeMounts: + - mountPath: /var/lib/minetest + name: minetest-data + - mountPath: /etc/minetest + name: config + restartPolicy: Always + volumes: + - name: minetest-data + persistentVolumeClaim: + claimName: minetest-data + - configMap: + defaultMode: 420 + name: minetest + name: config +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: minetest + name: minetest + namespace: default +spec: + ports: + - name: minetest + port: 30000 + protocol: UDP + selector: + app: minetest + type: NodePort -- 2.25.1