feat: Add Kubernetes manifests for NetHack server
- Creates Kubernetes deployment, service, and PVC manifests to run a multiplayer NetHack server. - Uses the pre-built matsuu/nethack-server:latest image. - Configures the service to expose port 4000 externally and correctly route traffic to the container's port 23. - Adds a .gitignore file to exclude temporary directories.
This commit is contained in:
34
k8s/deployment.yaml
Normal file
34
k8s/deployment.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nethack-server
|
||||
namespace: nethack
|
||||
labels:
|
||||
app: nethack
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nethack
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nethack
|
||||
spec:
|
||||
containers:
|
||||
- name: nethack
|
||||
image: matsuu/nethack-server:latest
|
||||
ports:
|
||||
- containerPort: 23
|
||||
env:
|
||||
- name: DGL_PORT
|
||||
value: "4000"
|
||||
- name: DGL_HOST
|
||||
value: "0.0.0.0"
|
||||
volumeMounts:
|
||||
- name: nethack-data
|
||||
mountPath: /opt/nethack/data
|
||||
volumes:
|
||||
- name: nethack-data
|
||||
persistentVolumeClaim:
|
||||
claimName: nethack-pvc
|
||||
Reference in New Issue
Block a user