fix: minor improvements.

This commit is contained in:
Benedikt Iltisberger
2024-01-24 09:05:00 +01:00
parent 28fb4a9ad3
commit 2292598821
6 changed files with 52 additions and 46 deletions

16
k8s/configmap.yaml Normal file
View File

@@ -0,0 +1,16 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: palworld-cm
data:
PUID: "1000"
PGID: "1000"
PORT: "8211" # Optional but recommended
PLAYERS: "16" # Optional but recommended
MULTITHREADING: "true"
RCON_ENABLED: "true"
RCON_PORT: "25575"
COMMUNITY: "false" # Enable this if you want your server to show up in the community servers tab, USE WITH SERVER_PASSWORD!
# Enable the environment variables below if you have COMMUNITY=true
# SERVER_PASSWORD: "yourServerPassword"
SERVER_NAME: "Server_Name" # Note, it seems spaces are not supported, so use underlines.

View File

@@ -4,7 +4,6 @@ metadata:
labels: labels:
app: palworld-server app: palworld-server
name: palworld-server name: palworld-server
namespace: default
spec: spec:
replicas: 1 replicas: 1
selector: selector:
@@ -16,38 +15,28 @@ spec:
app: palworld-server app: palworld-server
spec: spec:
containers: containers:
- env: - name: palworld-server
- name: "PLAYERS" image: thijsvanloef/palworld-server-docker
value: "16" imagePullPolicy: IfNotPresent
- name: "PORT" ports:
value: "8211" - containerPort: 8211
- name: "MULTITHREADING" name: 8211-palworld
value: "true" protocol: UDP
- name: "COMMUNITY" - containerPort: 27015
value: "true" name: 27015-palworld
- name: "SERVER_NAME" protocol: UDP
value: "YOUR SERVER NAME" env:
- name: "ADMIN_PASSWORD" - name: ADMIN_PASSWORD
value: "YOURPASSWORD" valueFrom:
- name: "UPDATE_ON_BOOT" secretKeyRef:
value: "true" name: palworld-secrets
image: thijsvanloef/palworld-server-docker key: rconPassword
imagePullPolicy: IfNotPresent envFrom:
name: palworld-server - configMapRef:
ports: name: palworld-cm
- containerPort: 8211 volumeMounts:
name: "8211-palworld" - mountPath: /palworld
protocol: UDP name: datadir
- containerPort: 27015
name: "27015-palworld"
protocol: UDP
resources:
requests:
cpu: 500m
memory: 512Mi
volumeMounts:
- mountPath: /palworld
name: datadir
volumes: volumes:
- name: datadir - name: datadir
persistentVolumeClaim: persistentVolumeClaim:

View File

@@ -4,12 +4,9 @@ metadata:
labels: labels:
app: palworld-server app: palworld-server
name: palworld-server-datadir name: palworld-server-datadir
namespace: default
spec: spec:
accessModes: accessModes:
- ReadWriteOnce - ReadWriteOnce
resources: resources:
requests: requests:
storage: 10Gi storage: 10Gi
storageClassName: local-path
volumeMode: Filesystem

View File

@@ -1,5 +1,7 @@
# Setup Palworld in kubernetes # Setup Palworld in kubernetes
kubectl apply -f pvc.yaml kubectl apply -f pvc.yaml
kubectl apply -f configmap.yaml
kubectl apply -f secret.yaml
kubectl apply -f service.yaml kubectl apply -f service.yaml
kubectl apply -f deployment.yaml kubectl apply -f deployment.yaml

7
k8s/secret.yaml Normal file
View File

@@ -0,0 +1,7 @@
apiVersion: v1
kind: Secret
metadata:
name: palworld-secrets
type: Opaque
stringData:
rconPassword: yourRconPassword

View File

@@ -4,21 +4,16 @@ metadata:
labels: labels:
app: palworld-server app: palworld-server
name: palworld-server name: palworld-server
namespace: default
spec: spec:
externalTrafficPolicy: Cluster
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ports: ports:
- name: palworld1 - name: 8211-palworld
port: 8211 port: 8211
protocol: UDP protocol: UDP
targetPort: 8211 targetPort: 8211-palworld
- name: palworld2 - name: 27015-palworld
port: 27015 port: 27015
protocol: UDP protocol: UDP
targetPort: 27015 targetPort: 27015-palworld
selector: selector:
app: palworld-server app: palworld-server
type: LoadBalancer type: LoadBalancer