open-webui.yaml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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-client
  64. accessModes:
  65. - ReadWriteMany
  66. resources:
  67. requests:
  68. storage: 10Gi
  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.org/client-max-body-size: "500m"
  79. nginx.org/proxy-connect-timeout: "60s"
  80. nginx.org/proxy-read-timeout: "60s"
  81. nginx.org/hsts: "True"
  82. spec:
  83. tls:
  84. - hosts:
  85. - gpt.dodges.it
  86. secretName: open-webui-le-secret
  87. rules:
  88. - host: gpt.dodges.it
  89. http:
  90. paths:
  91. - path: /
  92. pathType: Prefix
  93. backend:
  94. service:
  95. name: open-webui
  96. port:
  97. number: 8080
  98. ingressClassName: nginx