kubernetes部署onlyoffice-documentserver

  运维

文档

pvc onlyoffice-data

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: onlyoffice-data
  namespace: sre
spec:
  accessModes:
  - ReadWriteMany
  resources:
    requests:
      storage: "1500Gi"
  volumeName: 
  storageClassName: nfs-ssd


Deployment onlyoffice-documentserver

apiVersion: apps/v1
kind: Deployment
metadata:
  name: onlyoffice-documentserver
  namespace: sre
  labels:
    onlyoffice: documentserver
spec:
  selector:
    matchLabels:
      onlyoffice: documentserver
  template:
    metadata:
      labels:
        onlyoffice: documentserver
    spec:
      containers:
      - name: documentserver
        image: onlyoffice/documentserver:5.5.3.39
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 80
          name: http
        volumeMounts:
        - name: documentserver-data
          mountPath: /var/www/onlyoffice/Data
      volumes:
      - name: documentserver-data
        persistentVolumeClaim:
          claimName: onlyoffice-data

Service onlyoffice-documentserver

kind: Service
apiVersion: v1
metadata:
  labels:
    onlyoffice: documentserver
  name: onlyoffice-documentserver
  namespace: sre
spec:
  type: NodePort
  ports:
    - port: 80
      targetPort: 80
      protocol: TCP
      nodePort: 30065
  selector:
    onlyoffice: documentserver

ingress onlyoffice-documentserver

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: onlyoffice-documentserver
  namespace: sre
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/proxy-body-size: 10240m
    nginx.ingress.kubernetes.io/proxy-connect-timeout: "300"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "300"

spec:
  rules:
  - host: onlyoffice.test.com
    http:
      paths:
      - path: /
        backend:
          serviceName: onlyoffice-documentserver
          servicePort: 80

LEAVE A COMMENT

Captcha Code