Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jerryshell/k8s-alist-longhorn
K8s Alist Longhorn
https://github.com/jerryshell/k8s-alist-longhorn
alist homelab k8s kubernetes longhorn
Last synced: 4 days ago
JSON representation
K8s Alist Longhorn
- Host: GitHub
- URL: https://github.com/jerryshell/k8s-alist-longhorn
- Owner: jerryshell
- License: agpl-3.0
- Created: 2024-04-06T08:46:24.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-04-16T20:32:43.000Z (7 months ago)
- Last Synced: 2024-04-17T00:29:24.750Z (7 months ago)
- Topics: alist, homelab, k8s, kubernetes, longhorn
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# K8s Alist Longhorn
[K8s](https://kubernetes.io/) + [Alist](https://alist.nn.ci/) + [Longhorn](https://longhorn.io/)
## Pre-requisites
- Install Longhorn, Ref: [K8s PostgreSQL Longhorn](https://github.com/jerryshell/k8s-postgres-longhorn)
- TLS Ingress, Ref: [K8s Traefik cert-manager DNS01 TLS](https://github.com/jerryshell/k8s-traefik-cert-manager-dns01-tls)## Git clone
```bash
git clone https://github.com/jerryshell/k8s-alist-longhorn.git
cd k8s-alist-longhorn
```## PVC + Deployment + Service
```bash
kubectl apply -f k8s/
```## Ingress
Replace `pan.jerryshell.eu.org` with your own domain
```bash
export HOST=pan.jerryshell.eu.org
cat k8s/ingress/ingress.yaml | envsubst | kubectl apply -f -
```## TLS Ingress
Replace `pan.jerryshell.eu.org` with your own domain
```bash
export HOST=pan.jerryshell.eu.org
cat k8s/ingress/tls-ingress.yaml | envsubst | kubectl apply -f -
```## Delete
```bash
kubectl delete --ignore-not-found=true -f k8s/ -f k8s/ingress/
```## Note
Change alist-pvc Access Mode to ReadWriteMany
```bash
kubectl get pvc alist-pvc -o jsonpath='{.spec.volumeName}'
# pvc-UUID
kubectl patch pv pvc-UUID -p '{"spec":{"persistentVolumeReclaimPolicy":"Retain"}}'
kubectl scale --replicas=0 deployment alist
kubectl delete pvc alist-pvc
kubectl patch pv pvc-UUID -p '{"spec":{"claimRef":{"uid":""}}}'
kubectl patch pv pvc-UUID -p '{"spec":{"accessModes":["ReadWriteMany"]}}'
# Change alist-pvc.yaml accessModes to ReadWriteMany
vim alist-pvc.yaml
kubectl apply -f alist-pvc.yaml
kubectl patch pv pvc-UUID -p '{"spec":{"persistentVolumeReclaimPolicy":"Delete"}}'
kubectl scale --replicas=1 deployment alist
```---
If using nohostname-ingress.yaml
```bash
kubectl exec -it alist-XXX -- bash
``````bash
vi data/config.json
``````json
"site_url": "/alist"
```## LICENSE
[GNU Affero General Public License v3.0](https://choosealicense.com/licenses/agpl-3.0/)