open-webui.yaml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: open-webui
  5. namespace: llm
  6. spec:
  7. replicas: 1
  8. selector:
  9. matchLabels:
  10. name: open-webui
  11. template:
  12. metadata:
  13. labels:
  14. name: open-webui
  15. nginx: backend
  16. spec:
  17. containers:
  18. - name: open-webui
  19. image: ghcr.io/open-webui/open-webui:main
  20. imagePullPolicy: "Always"
  21. env:
  22. - name: OLLAMA_BASE_URL
  23. value: "https://llm.dodges.it"
  24. volumeMounts:
  25. - name: data
  26. mountPath: /app/backend/data
  27. ports:
  28. - containerPort: 8080
  29. name: http
  30. livenessProbe:
  31. httpGet:
  32. port: 8080
  33. httpHeaders:
  34. - name: Host
  35. value: "gpt.dodges.it"
  36. volumes:
  37. - name: data
  38. persistentVolumeClaim:
  39. claimName: open-webui-data
  40. ---
  41. apiVersion: v1
  42. kind: Service
  43. metadata:
  44. name: open-webui
  45. namespace: llm
  46. spec:
  47. type: ClusterIP
  48. ipFamilyPolicy: PreferDualStack
  49. selector:
  50. name: open-webui
  51. ports:
  52. - protocol: TCP
  53. port: 8080
  54. targetPort: 8080
  55. name: http
  56. ---
  57. apiVersion: v1
  58. kind: PersistentVolumeClaim
  59. metadata:
  60. name: open-webui-data
  61. namespace: llm
  62. spec:
  63. storageClassName: nfs-vrt
  64. accessModes:
  65. - ReadWriteMany
  66. resources:
  67. requests:
  68. storage: 200Gi
  69. ---
  70. apiVersion: networking.k8s.io/v1
  71. kind: Ingress
  72. metadata:
  73. name: open-webui-ingress
  74. namespace: llm
  75. annotations:
  76. cert-manager.io/cluster-issuer: "letsencrypt"
  77. acme.cert-manager.io/http01-edit-in-place: "true"
  78. nginx.ingress.kubernetes.io/client-body-buffer-size: "500m"
  79. nginx.ingress.kubernetes.io/proxy-connect-timeout: "60s"
  80. nginx.ingress.kubernetes.io/proxy-read-timeout: "60s"
  81. spec:
  82. tls:
  83. - hosts:
  84. - gpt.dodges.it
  85. secretName: open-webui-le-secret
  86. rules:
  87. - host: gpt.dodges.it
  88. http:
  89. paths:
  90. - path: /
  91. pathType: Prefix
  92. backend:
  93. service:
  94. name: open-webui
  95. port:
  96. number: 8080
  97. ingressClassName: nginx