From 4b5e61e9757a9be070063aca7efbb088d7d0c5a5 Mon Sep 17 00:00:00 2001 From: Mans Ziesel Date: Sat, 12 Oct 2024 20:15:45 +0200 Subject: [PATCH] configure traefik with IngressRoute CRD --- traefik/base/002-traefik-services.yaml | 3 +++ traefik/base/002-traefik.yaml | 6 ++++++ whoami/base/whoami-svc.yaml | 13 ------------- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/traefik/base/002-traefik-services.yaml b/traefik/base/002-traefik-services.yaml index a60f755..9c2bdbd 100644 --- a/traefik/base/002-traefik-services.yaml +++ b/traefik/base/002-traefik-services.yaml @@ -15,5 +15,8 @@ spec: - name: traefik-web port: 80 targetPort: web + - name: traefik-websecure + port: 443 + targetPort: websecure selector: app: traefik diff --git a/traefik/base/002-traefik.yaml b/traefik/base/002-traefik.yaml index ad414df..a19b01e 100644 --- a/traefik/base/002-traefik.yaml +++ b/traefik/base/002-traefik.yaml @@ -22,9 +22,15 @@ spec: args: - --api.insecure - --providers.kubernetesingress + - --entryPoints.web.Address=:80 + - --entryPoints.websecure.Address=:443 + - --entryPoints.traefik.Address=:8080 - --providers.kubernetesingress.ingressendpoint.publishedservice=traefik/traefik-service + - --providers.kubernetescrd ports: - name: web containerPort: 80 + - name: websecure + containerPort: 443 - name: dashboard containerPort: 8080 diff --git a/whoami/base/whoami-svc.yaml b/whoami/base/whoami-svc.yaml index 43ef7b2..75bb1fb 100644 --- a/whoami/base/whoami-svc.yaml +++ b/whoami/base/whoami-svc.yaml @@ -12,19 +12,6 @@ spec: --- 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