zentao.png

pvc zentao-data

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: zentao-data
  namespace: test
spec:
  accessModes:
    - ReadWriteMany
  storageClassName: "nfs"
  resources:
    requests:
      storage: 1500Gi

Deployment zentao-server

apiVersion: apps/v1
kind: Deployment
metadata:
  name: zentao-server
  namespace: test
  labels:
    app: zentao
spec:
  selector:
    matchLabels:
      app: zentao
  replicas: 1
  template:
    metadata:
      labels:
        app: zentao
    spec:
      containers:
      - name: zentao
        image: idoop/zentao:12.3
        #https://hub.docker.com/r/idoop/zentao
        imagePullPolicy: IfNotPresent
        env:
        - name: ADMINER_USER
          value: 'root'
          #mysql用户名
        - name: ADMINER_PASSWD
          value: '0ckrtsxmdfg_4z7uvR'
          #mysql密码
        - name: BIND_ADDRESS
          value: 'true'
        - name: SMTP_HOST
          value: 'smtp.test.cn'
        ports:
        - name: zentao
          containerPort: 80
        - name: mysql
          containerPort: 3306
        volumeMounts:
        - name: zentao-data 
          mountPath: /opt/zbox
      volumes:
        - name: zentao-data 
          persistentVolumeClaim:
            claimName: zentao-data

svc zentao

apiVersion: v1
kind: Service
metadata:
  labels:
    app: zentao
  name: zentao
  namespace: test
spec:
  ports:
  - name: zentao
    port: 80
    protocol: TCP
    targetPort: 80
    nodePort: 30051
  - name: mysql
    port: 3306
    protocol: TCP
    targetPort: 3306
    nodePort: 30052
  selector:
    app: zentao
  type: NodePort


web

http://172.16.0.21:30051
admin 123456

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code