Fix nginx routing setup
This commit is contained in:
parent
566c603738
commit
cec2f9bf02
@ -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
|
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user