configure traefik with IngressRoute CRD

This commit is contained in:
Mans Ziesel 2024-10-12 20:15:45 +02:00
parent e99761bd30
commit 4b5e61e975
3 changed files with 9 additions and 13 deletions

View File

@ -15,5 +15,8 @@ spec:
- name: traefik-web - name: traefik-web
port: 80 port: 80
targetPort: web targetPort: web
- name: traefik-websecure
port: 443
targetPort: websecure
selector: selector:
app: traefik app: traefik

View File

@ -22,9 +22,15 @@ spec:
args: args:
- --api.insecure - --api.insecure
- --providers.kubernetesingress - --providers.kubernetesingress
- --entryPoints.web.Address=:80
- --entryPoints.websecure.Address=:443
- --entryPoints.traefik.Address=:8080
- --providers.kubernetesingress.ingressendpoint.publishedservice=traefik/traefik-service - --providers.kubernetesingress.ingressendpoint.publishedservice=traefik/traefik-service
- --providers.kubernetescrd
ports: ports:
- name: web - name: web
containerPort: 80 containerPort: 80
- name: websecure
containerPort: 443
- name: dashboard - name: dashboard
containerPort: 8080 containerPort: 8080

View File

@ -12,19 +12,6 @@ spec:
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata:
name: whoami-traefik
namespace: whoami
spec:
ports:
- name: web
port: 80
targetPort: 80
selector:
app: whoami
---
apiVersion: v1
kind: Service
metadata: metadata:
name: whoami-np name: whoami-np
namespace: whoami namespace: whoami