-
Notifications
You must be signed in to change notification settings - Fork 22
Kubernetes
Kubernetes manifests are provided as a starting point for a deployment on Kubernetes. The manifest files can be found in the folder k8s
. The manifests were tested using Kubernetes on Docker Desktop and ingress-nginx. Depending on your Kubernetes setup and requirements, configuration changes are required.
- In
seafile-server-deployment.yaml
, configure the environments variablesspec.template.spec.containers.env
:
-
SEAFILE_URL
: The domain you intend to use for Seafile -
HTTPS
: Set totrue
if you plan to use a HTTPS ingress
- In
seahub-deployment.yaml
, configure the environments variablesspec.template.spec.containers.env
:
-
SEAFILE_ADMIN_EMAIL
: Username / E-Mail of the first admin user. -
SEAFILE_ADMIN_PASSWORD
: Password of the first admin user.
-
Configure the ingress in
seafile-ingress.yaml
according to your ingress controller and requirements. The provided file is configured for ingress-nginx. Sethost
toSEAFILE_URL
. -
Configure the PVCs according to your storage class and requirements in
seafile-data-persistentvolumeclaim.yaml
,seafile-mariadb-persistentvolumeclaim.yaml
,seafile-avatars-persistentvolumeclaim.yaml
andseafile-custom-persistentvolumeclaim.yaml
. See PVC Access Modes for more information.
Run the following command to install all manifests in the namespace seafile
:
kubectl apply -f ./k8s -n seafile
The pods of seafile-server
and seahub
share the same data volume. Further seahub
shares volumes with seahub-media
. The respective PVCs are therefore configured with access mode ReadWriteMany.
This allows the pods to be scheduled on different nodes and still share those volumes.
If you encounter an error resembling the one below, it indicates that your storage driver does not support the specified access mode:
failed to provision volume with StorageClass "harvester": rpc error: code = InvalidArgument desc = access mode MULTI_NODE_MULTI_WRITER is not supported
In response to this error, it becomes necessary to adjust the access mode of the PVCs from ReadWriteMany to ReadWriteOnce. Then it becomes crucial to coordinate the scheduling of the associated pods on the same nodes. To achieve this coordination, refer to the methods outlined in the Kubernetes documentation: Assigning Pods to Nodes.
If you run a single node cluster, the pod scheduling is not relevant.