Fix nginx routing setup
This commit is contained in:
parent
566c603738
commit
cec2f9bf02
@ -8,22 +8,19 @@ spec:
|
||||
- /nginx
|
||||
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: nginx-ingress
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: "traefik"
|
||||
"traefik.ingress.kubernetes.io/router.middlewares": default-stripprefix@kubernetescrd
|
||||
|
||||
spec:
|
||||
rules:
|
||||
- host: nginx.localhost
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: nginx-svc
|
||||
port:
|
||||
number: 80
|
||||
entryPoints:
|
||||
- web
|
||||
routes:
|
||||
- match: Host(`nginx.diogenes.halia`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: nginx-svc
|
||||
port: 80
|
||||
|
@ -2,7 +2,10 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nginx-svc
|
||||
labels:
|
||||
app: nginx
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
|
Loading…
Reference in New Issue
Block a user