一、部署yaml
- 部署前提是使用 nfs 作为动态 storageClass 存储。
- 直接参考我之前文档:https://blog.csdn.net/qq_39826987/article/details/132409882?spm=1001.2014.3001.5502
cat >zentao.yaml<<EOF
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: zentao-pvc
namespace: work
spec:
accessModes:
- ReadWriteMany
storageClassName: managed-nfs-storage
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: zentao-mysql-pvc
namespace: work
spec:
accessModes:
- ReadWriteMany
storageClassName: managed-nfs-storage
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: Service
metadata:
labels:
app: zentao
name: zentao-client
namespace: work
spec:
ports:
- port: 80
targetPort: 80
nodePort: 30007
name: zentao
selector:
app: zentao
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: zentao
namespace: work
labels:
app: zentao
spec:
selector:
matchLabels:
app: zentao
replicas: 1
template:
metadata:
labels:
app: zentao
spec:
containers:
- name: zentao
image: easysoft/zentao:12.4.3
#https://hub.docker.com/r/easysoft/zentao/tags
resources:
requests:
memory: "2Gi"
cpu: "2000m"
limits:
memory: "2Gi"
cpu: "2000m"
env:
- name: MYSQL_ROOT_PASSWORD
value: '123456'
#mysql密码
ports:
- name: zentao
containerPort: 80
- name: mysql
containerPort: 3306
volumeMounts:
- name: zentao-data
mountPath: /www/zentaopms
- name: zentao-mysql
mountPath: /var/lib/mysql
volumes:
- name: zentao-data
persistentVolumeClaim:
claimName: zentao-pvc
- name: zentao-mysql
persistentVolumeClaim:
claimName: zentao-mysql-pvc
EOF
kubectl create ns work
kubectl apply -f zentao.yaml
#查看
[root@k8s-master1 ~]# kubectl get pods -n work
NAME READY STATUS RESTARTS AGE
zentao-584777bdf7-v8gjc 1/1 Running 0 13m
[root@k8s-master1 ~]# kubectl get pvc -n work
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
zentao-mysql-pvc Bound pvc-8537a52f-5e37-4a2f-acb0-770e5c1734d1 1Gi RWX managed-nfs-storage 13m
zentao-pvc Bound pvc-e079d51d-f681-4640-a2bb-44da2bd6b577 1Gi RWX managed-nfs-storage 13m
[root@k8s-master1 ~]# kubectl get pvc -n work |grep zentao
zentao-mysql-pvc Bound pvc-8537a52f-5e37-4a2f-acb0-770e5c1734d1 1Gi RWX managed-nfs-storage 13m
zentao-pvc Bound pvc-e079d51d-f681-4640-a2bb-44da2bd6b577 1Gi RWX managed-nfs-storage 13m
二、访问使用
访问:http://192.168.4.115:30007/文章来源地址https://www.toymoban.com/news/detail-696382.html
- 点击开始安装————一直下一步————输入数据库密码:123456
- 创建用户名:admin 密码:123456,勾选中导入demo数据。
- 输入admin和123456登录,修改密码为:Abcd12345@
三、参考地址
- Docker版本禅道:https://www.zentao.net/book/zentaopmshelp/303.html
- 禅道开源版下载地址:http://dl.cnezsoft.com/zentao/docker/docker_zentao.zip
- 镜像地址:https://huangzhongde.cn/istio/assets/zentao-0.1.0.tgz
文章来源:https://www.toymoban.com/news/detail-696382.html
到了这里,关于k8s部署禅道的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!