Failure: Trying to get Proxmox to route through Traefik for SSL Cert

Hello
.
Context
I have a physical server running Proxmox.
On this I have multiple VMs which my k3s cluster is running on.
In my cluster I have Traefik configured as my Ingress Controller (installed separate after k3s not during k3s install)

Challenge
I am trying to get it so when I browse to my proxmox web GUI It is routed through traefik so it picks up my Lets Encrypt SSL cert.

Other Info
Proxmox is on: 10.90.1.1:8006
I have an A record for traefik that points to traefiks IP 10.90.3.201 that I access the traefik dashboard with (traefik.myinternaldomain)
I have a CNAME for proxmox that points to the traefik A record

Here is the YAML file I used to setup traefik for Proxmox

---
apiVersion: traefik.containo.us/v1alpha1
kind: ServersTransport
metadata:
  name: selfsigned
  namespace: traefik
spec:
  insecureSkipVerify: true
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: proxmox
  namespace: traefik
spec:
  entryPoints:
    - websecure
  routes:
  - match: Host(`proxmox.myinternaldomain`)
    kind: Rule
    services:
    - name: proxmox
      port: 443
      scheme: https
      serversTransport: selfsigned
---
apiVersion: v1
kind: Service
metadata:
  name: proxmox
  namespace: traefik
spec:
  ports:
    - name: http
      port: 443
      targetPort: 8006
---
apiVersion: v1
kind: Endpoints
metadata:
  name: proxmox
  namespace: traefik
subsets:
  - addresses:
      - ip: 10.90.1.1
    ports:
      - name: http
        port: 8006

Issue
When I browse to proxmox.myinternaldomain I get a 404, but that 404 has my lets Encrypt cert so it appears to be getting as far as traefik but no further
Also, the route does not show in the proxmox dashboard

I actually just fixed this with the help of Github Co-Pilot

I did a describe on the traefik pod

kubectl describe pod traefik-7dd78bd889-24w45 -n traefik

and found I had an arg called --providers.kubernetescrd.ingressClass=traefik-external Once I updated my IngressRoute for proxmox to include:

  name: proxmox
  namespace: traefik
  annotations:
    kubernetes.io/ingress.class: "traefik-external"

Everything worked

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.