mirror of
https://github.com/YuzuZensai/palworld-server-docker.git
synced 2026-01-06 04:32:43 +00:00
fix: minor improvements.
This commit is contained in:
16
k8s/configmap.yaml
Normal file
16
k8s/configmap.yaml
Normal 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.
|
||||
@@ -4,7 +4,6 @@ metadata:
|
||||
labels:
|
||||
app: palworld-server
|
||||
name: palworld-server
|
||||
namespace: default
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
@@ -16,38 +15,28 @@ spec:
|
||||
app: palworld-server
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
- name: "PLAYERS"
|
||||
value: "16"
|
||||
- name: "PORT"
|
||||
value: "8211"
|
||||
- name: "MULTITHREADING"
|
||||
value: "true"
|
||||
- name: "COMMUNITY"
|
||||
value: "true"
|
||||
- name: "SERVER_NAME"
|
||||
value: "YOUR SERVER NAME"
|
||||
- name: "ADMIN_PASSWORD"
|
||||
value: "YOURPASSWORD"
|
||||
- name: "UPDATE_ON_BOOT"
|
||||
value: "true"
|
||||
image: thijsvanloef/palworld-server-docker
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: palworld-server
|
||||
ports:
|
||||
- containerPort: 8211
|
||||
name: "8211-palworld"
|
||||
protocol: UDP
|
||||
- containerPort: 27015
|
||||
name: "27015-palworld"
|
||||
protocol: UDP
|
||||
resources:
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
volumeMounts:
|
||||
- mountPath: /palworld
|
||||
name: datadir
|
||||
- name: palworld-server
|
||||
image: thijsvanloef/palworld-server-docker
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 8211
|
||||
name: 8211-palworld
|
||||
protocol: UDP
|
||||
- containerPort: 27015
|
||||
name: 27015-palworld
|
||||
protocol: UDP
|
||||
env:
|
||||
- name: ADMIN_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: palworld-secrets
|
||||
key: rconPassword
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: palworld-cm
|
||||
volumeMounts:
|
||||
- mountPath: /palworld
|
||||
name: datadir
|
||||
volumes:
|
||||
- name: datadir
|
||||
persistentVolumeClaim:
|
||||
|
||||
@@ -4,12 +4,9 @@ metadata:
|
||||
labels:
|
||||
app: palworld-server
|
||||
name: palworld-server-datadir
|
||||
namespace: default
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
storageClassName: local-path
|
||||
volumeMode: Filesystem
|
||||
storage: 10Gi
|
||||
@@ -1,5 +1,7 @@
|
||||
# Setup Palworld in kubernetes
|
||||
|
||||
kubectl apply -f pvc.yaml
|
||||
kubectl apply -f configmap.yaml
|
||||
kubectl apply -f secret.yaml
|
||||
kubectl apply -f service.yaml
|
||||
kubectl apply -f deployment.yaml
|
||||
7
k8s/secret.yaml
Normal file
7
k8s/secret.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: palworld-secrets
|
||||
type: Opaque
|
||||
stringData:
|
||||
rconPassword: yourRconPassword
|
||||
@@ -4,21 +4,16 @@ metadata:
|
||||
labels:
|
||||
app: palworld-server
|
||||
name: palworld-server
|
||||
namespace: default
|
||||
spec:
|
||||
externalTrafficPolicy: Cluster
|
||||
internalTrafficPolicy: Cluster
|
||||
ipFamilies:
|
||||
- IPv4
|
||||
ports:
|
||||
- name: palworld1
|
||||
- name: 8211-palworld
|
||||
port: 8211
|
||||
protocol: UDP
|
||||
targetPort: 8211
|
||||
- name: palworld2
|
||||
targetPort: 8211-palworld
|
||||
- name: 27015-palworld
|
||||
port: 27015
|
||||
protocol: UDP
|
||||
targetPort: 27015
|
||||
targetPort: 27015-palworld
|
||||
selector:
|
||||
app: palworld-server
|
||||
type: LoadBalancer
|
||||
Reference in New Issue
Block a user