---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: portainer
  namespace: portainer
  annotations: 
    kubernetes.io/ingress.class: traefik-external
spec:
  entryPoints:
    - websecure
  routes:
    - match: Host(`www.portainer.yourdomain.com`) # change me
      kind: Rule
      services:
        - name: portainer
          port: 9443
    - match: Host(`portainer.yourdomain.com`) # change me
      kind: Rule
      services:
        - name: portainer
          port: 9443
          scheme: https
          passHostHeader: true
      middlewares:
        - name: default-headers
  tls:
    secretName: yourdomain-tls # change me
