This is an example of running Citadel in a Kubernetes environment. We are asuming that you are already somewhat proficient in Kubernetes, and just need an idea of how Citadel expects to be handled. Feel free to cut-and-paste this example into your own environment.
---
# The containerized distribution of Citadel requires a single persistent volume.
# An example of a candidate PersistentVolumeClaim appears here. You definitely want
# to go with the ReadWriteOnce access mode to prevent multiple instances of Citadel
# Server from trying to hit it at once.
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: citadel-data
spec:
storageClassName: YOUR_STORAGE_CLASS_NAME_HERE
accessModes: [ReadWriteOnce]
resources:
requests:
storage: 100Gi
---
# Here is where we launch the Pod with the container in it.
# You can see how we have our persistent volume mounted at /citadel-data
# When you upgrade, you can delete the Pod and launch a newer version,
# leaving the persistent volume in place to keep your data.
kind: Pod
apiVersion: v1
metadata:
name: ctdl-app
labels:
app: ctdl
spec:
volumes:
- name: citadel-data
persistentVolumeClaim:
claimName: citadel-data
containers:
- name: ctdl-app
image: citadeldotorg/citadel:latest
volumeMounts:
- mountPath: "/citadel-data"
name: citadel-data
---
# You can use any ingress class you want, as long as you expose the correct ports.
# It would be great if you can ingress and egress on the same IP addresses, but is
# not strictly required. You will definitely need to make sure your DNS (forward,
# reverse, SPF, DKIM, etc) is all in order if you intend to use Citadel for email.
apiVersion: v1
kind: Service
metadata:
name: tp-ingress-ctdl
spec:
type: LoadBalancer
selector:
app: ctdl
ports:
- name: smtp
protocol: TCP
port: 25
- name: http
protocol: TCP
port: 80
- name: pop3
protocol: TCP
port: 110
- name: imap
protocol: TCP
port: 143
- name: https
protocol: TCP
port: 443
- name: citadel
protocol: TCP
port: 504
- name: submit
protocol: TCP
port: 587
- name: xmpp
protocol: TCP
port: 5222