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 - /nginx
--- ---
apiVersion: networking.k8s.io/v1 apiVersion: traefik.containo.us/v1alpha1
kind: Ingress kind: IngressRoute
metadata: metadata:
name: nginx-ingress name: nginx-ingress
annotations: annotations:
kubernetes.io/ingress.class: "traefik"
"traefik.ingress.kubernetes.io/router.middlewares": default-stripprefix@kubernetescrd "traefik.ingress.kubernetes.io/router.middlewares": default-stripprefix@kubernetescrd
spec: spec:
rules: entryPoints:
- host: nginx.localhost - web
http: routes:
paths: - match: Host(`nginx.diogenes.halia`)
- path: / kind: Rule
pathType: Prefix services:
backend: - name: nginx-svc
service: port: 80
name: nginx-svc
port:
number: 80

View File

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