You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RuoYi-Vue-cloud/cloud/deploy/ruoyi-nginx.yaml

54 lines
914 B

apiVersion: apps/v1
kind: Deployment
metadata:
name: ruoyi-nginx
spec:
replicas: 1
selector:
matchLabels:
app: ruoyi-nginx
template:
metadata:
labels:
app: ruoyi-nginx
spec:
containers:
- name: ruoyi-nginx
image: 192.168.75.181/library/html:v1.0
imagePullPolicy: Always
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: ruoyi-nginx-service
spec:
selector:
app: ruoyi-nginx
ports:
- port: 80
targetPort: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ruoyi-nginx-ingress
labels:
name: ruoyi-nginx-ingress
spec:
ingressClassName: nginx
rules:
- host: ruoyi.nginx.com
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: ruoyi-nginx-service
port:
number: 80