change ingressroutes

This commit is contained in:
Mans Ziesel 2024-10-13 17:16:59 +02:00
parent c724848845
commit 7363b76d54
2 changed files with 8 additions and 51 deletions

View File

@ -1,27 +1,11 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ip-mzisel-nl-ingress
annotations:
traefik.ingress.kubernetes.io/middlewares: default-strip-ip-prefix@kubernetescrd
spec:
rules:
- http:
paths:
- path: /ip
pathType: Prefix
backend:
service:
name: ip-mziesel-nl
port:
name: web
---
apiVersion: traefik.io/v1alpha1
kind: Middleware
kind: IngressRoute
metadata:
name: strip-ip-prefix
name: ip-mziesel-nl-ingressroute
spec:
stripPrefix:
prefixes:
- "/ip"
forceSlash: false
routes:
- match: Host(`ip.mziesel.nl`) || Host(`ip4.mziesel.nl`) || Host(`ip6.mziesel.nl`)
kind: Rule
services:
- name: ip-mziesel-nl
port: web

View File

@ -9,30 +9,3 @@ spec:
targetPort: web
selector:
app: whoami
---
apiVersion: v1
kind: Service
metadata:
name: whoami-traefik
namespace: whoami
spec:
ports:
- name: web
port: 80
targetPort: 80
selector:
app: whoami
---
apiVersion: v1
kind: Service
metadata:
name: whoami-np
namespace: whoami
spec:
type: NodePort
ports:
- nodePort: 30007
port: 80
targetPort: 80
selector:
app: whoami