ruoyi-ui-deploy.yaml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. namespace: ruoyi
  5. name: ruoyi-ui
  6. labels:
  7. app: ruoyi-ui
  8. spec:
  9. replicas: 2
  10. selector:
  11. matchLabels:
  12. app: ruoyi-ui
  13. template:
  14. metadata:
  15. labels:
  16. app: ruoyi-ui
  17. spec:
  18. containers:
  19. - name: ruoyi-ui
  20. image: 192.168.0.5:9080/repo/ruoyi-ui:latest
  21. imagePullPolicy: Always
  22. ports:
  23. - containerPort: 80
  24. ---
  25. apiVersion: v1
  26. kind: Service
  27. metadata:
  28. namespace: ruoyi
  29. labels:
  30. app: ruoyi-ui
  31. name: ruoyi-ui
  32. spec:
  33. selector:
  34. app: ruoyi-ui
  35. ports:
  36. - protocol: TCP
  37. port: 80
  38. targetPort: 80
  39. type: ClusterIP
  40. ---
  41. apiVersion: networking.k8s.io/v1
  42. kind: Ingress
  43. metadata:
  44. name: ruoyi-ui
  45. namespace: ruoyi
  46. spec:
  47. ingressClassName: traefik
  48. rules:
  49. - host: ui.ruoyi.com
  50. http:
  51. paths:
  52. - path: /
  53. pathType: Prefix
  54. backend:
  55. service:
  56. name: ruoyi-ui
  57. port:
  58. number: 80