Configure Custom Domain

Set up a custom domain with automatic TLS certificate.

Prerequisites

  • DNS configured to point domain to cluster ingress IP

  • cert-manager ClusterIssuer configured (letsencrypt-cluster-issuer)

Single Domain

Specify the domain in your StaticSite:

apiVersion: pages.kup6s.com/v1alpha1
kind: StaticSite
metadata:
  name: my-website
  namespace: my-namespace
spec:
  repo: https://github.com/user/my-website.git
  domain: www.example.com

The operator automatically:

  1. Creates an IngressRoute for Host(\www.example.com`)`

  2. Creates a Certificate for TLS

  3. Configures the IngressRoute to use the certificate

Multiple Sites on Same Domain (Path Prefix)

Serve multiple repositories under different paths of the same domain:

apiVersion: pages.kup6s.com/v1alpha1
kind: StaticSite
metadata:
  name: archive-2023
  namespace: my-namespace
spec:
  repo: https://github.com/org/archive-2023.git
  domain: www.example.com
  pathPrefix: /2023
---
apiVersion: pages.kup6s.com/v1alpha1
kind: StaticSite
metadata:
  name: archive-2024
  namespace: my-namespace
spec:
  repo: https://github.com/org/archive-2024.git
  domain: www.example.com
  pathPrefix: /2024

Both sites share the same TLS certificate. Requests to:

  • https://www.example.com/2023/ → served from archive-2023 repo

  • https://www.example.com/2024/ → served from archive-2024 repo

Note: pathPrefix requires a custom domain to be set.

Verify Certificate

Check the certificate status:

kubectl get certificate -n my-namespace
kubectl describe certificate www-example-com-tls -n my-namespace

If certificate is not ready, check cert-manager:

kubectl get certificaterequest -n my-namespace
kubectl describe certificaterequest <name> -n my-namespace