Calibre-web 是一个便捷的电子书管理与浏览软件,它提供了一个干净的界面,可以使用现有的 Calibre 数据库浏览、阅读和下载电子书。 还可以通过应用程序本身集成谷歌驱动器和编辑元数据以及您的 calibre 库。
本文提供一种k8s部署方法。
部署pvc
为了持久化数据,本文使用nfs创建storageClass
helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/
helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \
--set nfs.server=192.168.49.1 \
--set nfs.path=/nfs/rootfs
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: calibre-web-pvc
spec:
storageClassName: nfs-client
accessModes:
- ReadWriteMany
resources:
requests:
storage: 300G
将metadata.db放到上述pvc创建的目录下
metadata.db下载
metadata.db: https://url11.ctfile.com/f/36678611-810540306-eecfc1?p=2890 (访问密码: 2890)
部署deployment
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: calibre-web
name: calibre-web
spec:
replicas: 1
revisionHistoryLimit: 2
selector:
matchLabels:
app: calibre-web
template:
metadata:
labels:
app: calibre-web
spec:
containers:
- env:
- name: KUBERNETES_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: HOSTNAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: PUID
value: '1000'
- name: PGID
value: '1000'
image: linuxserver/calibre-web:0.6.19
imagePullPolicy: IfNotPresent
name: calibre-web
ports:
- containerPort: 8083
name: http
protocol: TCP
securityContext:
privileged: false
volumeMounts:
- mountPath: /books
name: calibre-web-pvc
volumes:
- name: calibre-web-pvc
persistentVolumeClaim:
claimName: calibre-web-pvc
部署service
---
apiVersion: v1
kind: Service
metadata:
labels:
expose: "true"
app: calibre-web
name: calibre-web
spec:
type: NodePort
ports:
- name: http
port: 8083
protocol: TCP
nodePort: 30093
selector:
app: calibre-web
本文为从大数据到人工智能博主「xiaozhch5」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://lrting.top/backend/12793/