Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: added basic yamls for kubernetes support. #65

Merged
merged 2 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions k8s/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: palworld-server
name: palworld-server
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: palworld-server
template:
metadata:
labels:
app: palworld-server
spec:
containers:
- env:
beneiltis marked this conversation as resolved.
Show resolved Hide resolved
- 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"
beneiltis marked this conversation as resolved.
Show resolved Hide resolved
protocol: UDP
- containerPort: 27015
name: "27015-palworld"
beneiltis marked this conversation as resolved.
Show resolved Hide resolved
protocol: UDP
resources:
beneiltis marked this conversation as resolved.
Show resolved Hide resolved
requests:
cpu: 500m
beneiltis marked this conversation as resolved.
Show resolved Hide resolved
memory: 512Mi
volumeMounts:
- mountPath: /palworld
name: datadir
volumes:
- name: datadir
persistentVolumeClaim:
claimName: palworld-server-datadir
15 changes: 15 additions & 0 deletions k8s/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
app: palworld-server
name: palworld-server-datadir
namespace: default
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: local-path
beneiltis marked this conversation as resolved.
Show resolved Hide resolved
volumeMode: Filesystem
beneiltis marked this conversation as resolved.
Show resolved Hide resolved
5 changes: 5 additions & 0 deletions k8s/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Setup Palworld in kubernetes

kubectl apply -f pvc.yaml
kubectl apply -f service.yaml
kubectl apply -f deployment.yaml
24 changes: 24 additions & 0 deletions k8s/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: palworld-server
name: palworld-server
namespace: default
spec:
externalTrafficPolicy: Cluster
beneiltis marked this conversation as resolved.
Show resolved Hide resolved
internalTrafficPolicy: Cluster
beneiltis marked this conversation as resolved.
Show resolved Hide resolved
ipFamilies:
beneiltis marked this conversation as resolved.
Show resolved Hide resolved
- IPv4
ports:
- name: palworld1
port: 8211
protocol: UDP
targetPort: 8211
beneiltis marked this conversation as resolved.
Show resolved Hide resolved
- name: palworld2
port: 27015
protocol: UDP
targetPort: 27015
beneiltis marked this conversation as resolved.
Show resolved Hide resolved
selector:
app: palworld-server
type: LoadBalancer
Loading