|
|
@@ -0,0 +1,57 @@
|
|
|
+apiVersion: apps/v1
|
|
|
+kind: Deployment
|
|
|
+metadata:
|
|
|
+ namespace: ruoyi
|
|
|
+ name: ruoyi-admin
|
|
|
+ labels:
|
|
|
+ app: ruoyi-admin
|
|
|
+spec:
|
|
|
+ replicas: 2
|
|
|
+ selector:
|
|
|
+ matchLabels:
|
|
|
+ app: ruoyi-admin
|
|
|
+ template:
|
|
|
+ metadata:
|
|
|
+ labels:
|
|
|
+ app: ruoyi-admin
|
|
|
+ spec:
|
|
|
+ containers:
|
|
|
+ - name: ruoyi-admin
|
|
|
+ image: 192.168.0.5:9080/repo/ruoyi-admin:latest
|
|
|
+ imagePullPolicy: Always
|
|
|
+ ports:
|
|
|
+ - containerPort: 8080
|
|
|
+---
|
|
|
+apiVersion: v1
|
|
|
+kind: Service
|
|
|
+metadata:
|
|
|
+ namespace: ruoyi
|
|
|
+ labels:
|
|
|
+ app: ruoyi-admin
|
|
|
+ name: ruoyi-admin
|
|
|
+spec:
|
|
|
+ selector:
|
|
|
+ app: ruoyi-admin
|
|
|
+ ports:
|
|
|
+ - port: 18081
|
|
|
+ targetPort: 8080
|
|
|
+ type: ClusterIP
|
|
|
+---
|
|
|
+apiVersion: networking.k8s.io/v1
|
|
|
+kind: Ingress
|
|
|
+metadata:
|
|
|
+ name: ruoyi-admin
|
|
|
+ namespace: ruoyi
|
|
|
+spec:
|
|
|
+ ingressClassName: traefik
|
|
|
+ rules:
|
|
|
+ - host: ruoyi.autumn.com
|
|
|
+ http:
|
|
|
+ paths:
|
|
|
+ - path: /api/v1
|
|
|
+ pathType: Prefix
|
|
|
+ backend:
|
|
|
+ service:
|
|
|
+ name: ruoyi
|
|
|
+ port:
|
|
|
+ number: 18081
|