mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
Provide a kubernetes example
This commit is contained in:
parent
35ec677446
commit
5bf4a3fd1d
41
minecraft-server/k8s-examples/vanilla-deployment.yml
Normal file
41
minecraft-server/k8s-examples/vanilla-deployment.yml
Normal file
@ -0,0 +1,41 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mc-vanilla
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 25565
|
||||
nodePort: 30000
|
||||
selector:
|
||||
app: mc-vanilla
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mc-vanilla
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mc-vanilla
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mc-vanilla
|
||||
spec:
|
||||
containers:
|
||||
- image: itzg/minecraft-server
|
||||
name: mc-vanilla
|
||||
env:
|
||||
# Use secret in real usage
|
||||
- name: EULA
|
||||
value: "true"
|
||||
ports:
|
||||
- containerPort: 25565
|
||||
name: main
|
||||
volumeMounts:
|
||||
- name: mc-data
|
||||
mountPath: /data
|
||||
volumes:
|
||||
- name: mc-data
|
||||
emptyDir: {}
|
Loading…
Reference in New Issue
Block a user