Run MapTiler Server in Kubernetes
This page provides instructions on how to run MapTiler Server in Kubernetes using our pre-configured Helm chart.
Prerequisites
- Running Kubernetes cluster with at least 1 node.
- Running Ingress controller.
- Helm installed.
Steps
-
Install the MapTiler Server Helm chart:
helm repo add maptiler https://labs.maptiler.com/maptiler-server-kubernetes/
-
Deploy MapTiler Server on the Kubernetes cluster in the default configuration:
helm install maptiler-server-app maptiler/maptiler-server
Complete documentation of the MapTiler Server Helm chart is available at Artifact Hub.
Sample configurations
nginx Ingress controller
Here’s a sample nginx Ingress controller that you can use in the values.yaml file included in the Helm chart.
- To use custom max body size for nginx requests, define the
nginx.ingress.kubernetes.io/proxy-body-size
annotation. - If you want to use TLS, you need to create a Kubernetes TLS secret named maptiler-server-tls first.
ingress:
enabled: true
className: nginx
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: 300m
hosts:
- host: maps.company.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: maptiler-server-tls
hosts:
- maps.company.com
Shared storage
If you plan to run multiple replicas of MapTiler Server with shared tileset data and configuration, you need to make sure that each replica can access the same Persistent Volume where the data and config is stored. To do that, configure the Persistent Volume Claim to use a Storage Class which supports the ReadWriteMany access mode. Alternatively, you can set up an NFS storage.
Here’s a sample Persistent Volume configuration for the values.yaml file:
storage:
storageClassName: csi-cinder-classic
size: 20Gi
volumes:
- name: maptiler-server-data
persistentVolumeClaim:
claimName: maptiler-server-app
volumeMounts:
- mountPath: /data/
name: maptiler-server-data