apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: ruoyi
  name: ruoyi-ui
  labels:
    app: ruoyi-ui
spec:
  replicas: 2
  selector:
    matchLabels:
      app: ruoyi-ui
  template:
    metadata:
      labels:
        app: ruoyi-ui
    spec:
      containers:
        - name: ruoyi-ui
          image: 192.168.0.5:9080/repo/ruoyi-ui:latest
          imagePullPolicy: Always
          ports:
            - containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
  namespace: ruoyi
  labels:
    app: ruoyi-ui
  name: ruoyi-ui
spec:
  selector:
    app: ruoyi-ui
  ports:
    - protocol: TCP
      port: 80
      targetPort: 80
  type: ClusterIP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ruoyi-ui
  namespace: ruoyi
spec:
  ingressClassName: traefik
  rules:
    - host: ruoyi.autumn.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: ruoyi-ui
                port:
                  number: 80
