diff --git a/minecraft/deployment.yaml b/minecraft/deployment.yaml new file mode 100644 index 0000000..ef83688 --- /dev/null +++ b/minecraft/deployment.yaml @@ -0,0 +1,23 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: minecraft +spec: + replicas: 1 + selector: + matchLabels: + app: minecraft + template: + metadata: + labels: + app: minecraft + spec: + containers: + - name: minecraft + image: itzg/minecraft-server + ports: + - containerPort: 25565 + protocol: UDP + env: + - name: EULA + value: "TRUE" diff --git a/minecraft/ingress.yaml b/minecraft/ingress.yaml new file mode 100644 index 0000000..a0478f6 --- /dev/null +++ b/minecraft/ingress.yaml @@ -0,0 +1,15 @@ +apiVersion: traefik.containo.us/v1alpha1 +kind: IngressRouteUDP +metadata: + name: minecraft-ingress-udp + annotations: + kubernetes.io/ingress.class: "traefik" + +spec: + entryPoints: + - minecraft-udp + routes: + - services: + - name: minecraft + port: 25565 + diff --git a/minecraft/service.yaml b/minecraft/service.yaml new file mode 100644 index 0000000..12facfb --- /dev/null +++ b/minecraft/service.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: minecraft-svc +spec: + ports: + - name: minecraft-udp + port: 25565 + protocol: UDP + selector: + app: minecraft