我正在使用部署在K8上的JBPM业务中心。下面是我的depolyment.apps,其中附着有永久卷。
kubectl edit deployment.apps/jbpm-server-full
volumes:
- name: jbpm-pv-storage
persistentVolumeClaim:
claimName: jbpm-pv-claim
但是当我重新启动Pod时,即使我们已将永久卷附加到k8S pod上,我也失去了业务中心的所有工作空间。
您需要在容器内安装该卷并将数据写入已安装的路径
apiVersion: v1
kind: Pod
metadata:
name: task-pv-pod
spec:
volumes:
- name: task-pv-storage
persistentVolumeClaim:
claimName: task-pv-claim
containers:
- name: task-pv-container
image: nginx
ports:
- containerPort: 80
name: "http-server"
volumeMounts:
- mountPath: "/usr/share/nginx/html"
name: task-pv-storage
https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/