0

Learning about how to connect my 2 domains (foo.com, bar.com) to a VPS with on it a single node K3s cluster.

Completely new to this I concluded I need for each domain a TLS certificate. I read about DNS.01 challenge but that is for sub domains like blog.foo.com and foo.com.

Using K3s, Traefik is adviced, cert-manager with let's encrypt is the free option.

First question Am i correct so far?

Going further, I was reading about how to implement a TLS certificate in my IngressRoute (not kind:Ingress) and it looks there is only 1 TLS option in an IngressRoute. Next bit is of the Traefik website

tls:                              # [11]
  secretName: supersecret         # [12]
  options:                        # [13]
    name: opt                     # [14]
    namespace: default            # [15]
  certResolver: foo               # [16]
  domains:                        # [17]
  - main: example.net             # [18]
    sans:                         # [19]
    - a.example.net
    - b.example.net

Second question Do I then need multiple IngressRoute files? (not sure if this is possible)

What I have so far is a simple IngressRoute file with 3 rules (foo.com, foo.com/api, bar.com) and this works when I curl to them.

Extra question Is my plan missing something? I can curl on the VPS and in a normal browser the domain is routing to a missing certificate page, so the only thing left is TLS?

furion2000
  • 79
  • 7

0 Answers0