This guide walks through setting up Wiki.js in a Kubernetes cluster, using:
✅ Persistent storage on NFS
✅ PostgreSQL running in a Proxmox VM
✅ Ingress with TLS via cert-manager
✅ Redis for caching
Before you start, ensure you have:
nfs-client)192.168.88.221)apiVersion: v1
kind: Namespace
metadata:
name: wiki
---
# PostgreSQL Persistent Volume Claim (NFS)
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgres-data
namespace: wiki
spec:
accessModes:
- ReadWriteMany
storageClassName: nfs-client
resources:
requests:
storage: 5Gi
---
# Wiki.js Persistent Volume Claim (NFS)
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: wikijs-data
namespace: wiki
spec:
accessModes:
- ReadWriteMany
storageClassName: nfs-client
resources:
requests:
storage: 10Gi
---
# Wiki.js Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: wikijs
namespace: wiki
spec:
replicas: 1
selector:
matchLabels:
app: wikijs
template:
metadata:
labels:
app: wikijs
spec:
containers:
- name: wikijs
image: ghcr.io/requarks/wiki:latest
resources:
requests:
cpu: "250m"
memory: "512Mi"
limits:
cpu: "2"
memory: "2Gi"
env:
- name: DB_TYPE
value: "postgres"
- name: DB_HOST
value: "postgres.aboft.local" # Proxmox VM IP
- name: DB_PORT
value: "5432"
- name: DB_USER
value: "wikijs"
- name: DB_PASS
value: "StrongPassword123!"
- name: DB_NAME
value: "wikijs"
- name: CACHE_DRIVER
value: "redis"
- name: REDIS_HOST
value: "redis.wiki.svc.cluster.local"
volumeMounts:
- name: wikijs-data
mountPath: /wiki/data
volumes:
- name: wikijs-data
persistentVolumeClaim:
claimName: wikijs-data
---
# Wiki.js Service
apiVersion: v1
kind: Service
metadata:
name: wikijs
namespace: wiki
spec:
ports:
- protocol: TCP
port: 3000
targetPort: 3000
name: http
selector:
app: wikijs
---
# Redis Deployment (for caching)
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
namespace: wiki
spec:
replicas: 1
selector:
matchLabels:
app: redis
template:
metadata:
labels:
app: redis
spec:
containers:
- name: redis
image: redis:7
resources:
requests:
cpu: "250m"
memory: "256Mi"
limits:
cpu: "1"
memory: "512Mi"
ports:
- containerPort: 6379
---
# Redis Service
apiVersion: v1
kind: Service
metadata:
name: redis
namespace: wiki
spec:
ports:
- port: 6379
selector:
app: redis
---
# Ingress for Wiki.js with TLS
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: wikijs-ingress
namespace: wiki
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: "letsencrypt"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/proxy-body-size: "50m"
nginx.ingress.kubernetes.io/proxy-read-timeout: "60"
nginx.ingress.kubernetes.io/proxy-send-timeout: "60"
spec:
ingressClassName: nginx
tls:
- hosts:
- wiki.aboft.dev
secretName: wiki-tls
rules:
- host: wiki.aboft.dev
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: wikijs
port:
number: 3000
1️⃣ Apply the YAML file to your cluster:
kubectl apply -f wiki-deployment.yaml
2️⃣ Verify that everything is running:
kubectl get pods -n wiki
kubectl get svc -n wiki
kubectl get ingress -n wiki
3️⃣ Access Wiki.js in your browser:
https://wiki.aboft.dev
4️⃣ Complete the setup wizard.
If Wiki.js doesn’t work, check:
kubectl logs -n wiki -l app=wikijs
kubectl describe pod -n wiki -l app=wikijs
kubectl get events -n wiki
✅ If Ingress isn't working, check:
kubectl logs -n kube-system -l app.kubernetes.io/name=ingress-nginx