Fix nginx routing setup

This commit is contained in:
Tanguy Herbron 2022-05-15 20:30:42 +02:00
parent 566c603738
commit cec2f9bf02
2 changed files with 14 additions and 14 deletions

View File

@ -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

View File

@ -2,7 +2,10 @@ apiVersion: v1
kind: Service
metadata:
name: nginx-svc
labels:
app: nginx
spec:
type: ClusterIP
ports:
- name: http
port: 80