使用华为云硬盘方式备份禅道数据,一旦pod重启,页面就无法访问(是因为内置数据库没了,进容器里看只剩系统库了,zentao这个库没了)
回帖数
8
阅读数
787
发表时间
2023-05-12 11:29:24
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: chandao-pvc
namespace: lstack
spec:
accessModes:
- ReadWriteOnce
storageClassName: chandao-sas
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: Service
metadata:
labels:
app: chandao
name: chandao-client
namespace: lstack
spec:
ports:
- name: chandao
port: 80
targetPort: 80
nodePort: 31526
- name: mysql
port: 3306
targetPort: 3306
nodePort: 31234
selector:
app: chandao
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: chandao
namespace: lstack
labels:
app: chandao
spec:
selector:
matchLabels:
app: chandao
replicas: 1
template:
metadata:
labels:
app: chandao
spec:
containers:
- name: chandao
image: easysoft/zentao:18.3
resources:
requests:
memory: "2Gi"
cpu: "2000m"
env:
- name: MYSQL_ROOT_PASSWORD
value: '123456'
ports:
- name: chandao
containerPort: 80
- name: mysql
containerPort: 3306
volumeMounts:
- name: chandao
mountPath: /www/zentaopms
volumes:
- name: chandao
persistentVolumeClaim:
claimName: chandao-pvc
kind: PersistentVolumeClaim
metadata:
name: chandao-pvc
namespace: lstack
spec:
accessModes:
- ReadWriteOnce
storageClassName: chandao-sas
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: Service
metadata:
labels:
app: chandao
name: chandao-client
namespace: lstack
spec:
ports:
- name: chandao
port: 80
targetPort: 80
nodePort: 31526
- name: mysql
port: 3306
targetPort: 3306
nodePort: 31234
selector:
app: chandao
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: chandao
namespace: lstack
labels:
app: chandao
spec:
selector:
matchLabels:
app: chandao
replicas: 1
template:
metadata:
labels:
app: chandao
spec:
containers:
- name: chandao
image: easysoft/zentao:18.3
resources:
requests:
memory: "2Gi"
cpu: "2000m"
env:
- name: MYSQL_ROOT_PASSWORD
value: '123456'
ports:
- name: chandao
containerPort: 80
- name: mysql
containerPort: 3306
volumeMounts:
- name: chandao
mountPath: /www/zentaopms
volumes:
- name: chandao
persistentVolumeClaim:
claimName: chandao-pvc
一旦我持久化mysql哪个文件夹 服务就起不来了 看日志是无法连接mysql服务
2023-05-15 09:42:27 light 回帖
可以进入容器内,检查通过命令行是否可以正常登录数据库;
另外可以添加页面上方QQ,邀请您进入技术交流群沟通问题。
另外可以添加页面上方QQ,邀请您进入技术交流群沟通问题。
2023-05-15 09:47:22 禅道-阿龙 回帖
容器内部也连不上 缺少这个文件
2023-05-15 10:00:39 light 回帖
K8S部署的话,参考这个手册,使用渠成的镜像:docker pull easysoft/quickon-zentao:18.3-20230424
easysoft/quickon-zentao - Docker Image | Docker Hub
easysoft/quickon-zentao - Docker Image | Docker Hub
2023-05-15 10:02:32 禅道-阿龙 回帖
helm安装也不行的
2023-05-15 10:03:45 light 回帖
渠成的镜像内不包含数据库,需要使用容器外部的数据库;
麻烦添加页面上方的QQ,邀请您技术技术交流群沟通。
2023-05-15 10:09:14 禅道-阿龙 回帖
或者提供一下怎么helm安装的,可以参考一下helm安装 https://github.com/quicklyon/zentao-docker#72-kubernetes%E9%80%9A%E8%BF%87helm%E5%91%BD%E4%BB%A4%E5%AE%89%E8%A3%85%E5%BC%80%E6%BA%90%E7%89%88%E7%A4%BA%E4%BE%8B
2023-05-15 15:29:46 郑院生 回帖
联系人
魏中显/高级客户经理
电话(微信)
18561939726
QQ号码
1746749398
联系邮箱
weizhongxian@chandao.com