--- apiVersion: apps/v1 kind: StatefulSet metadata: labels: app: bds name: bds spec: # never more than 1 since BDS is not horizontally scalable replicas: 1 serviceName: bds selector: matchLabels: app: bds template: metadata: labels: app: bds spec: containers: - name: main image: itzg/minecraft-bedrock-server volumeMounts: - mountPath: /data name: data env: - name: EULA value: "TRUE" ports: - containerPort: 19132 protocol: UDP readinessProbe: &probe exec: command: - mc-monitor - status-bedrock - --host # force health check against IPv4 port - 127.0.0.1 initialDelaySeconds: 30 livenessProbe: *probe volumeClaimTemplates: - metadata: name: data spec: accessModes: - ReadWriteOnce resources: requests: storage: 1Gi --- apiVersion: v1 kind: Service metadata: name: bds spec: selector: app: bds ports: - port: 19132 protocol: UDP ipFamily: IPv4 # Use LoadBalancer if running on a provider that supports that # type: LoadBalancer # or use NodePort on a non-managed system; # however, you'll need to lookup port assigned to the service type: NodePort