apiVersion: traefik.io/v1alpha1
kind: ServersTransport
metadata:
  name: kubernetes-dashboard-transport
  namespace: kube-system

spec:
  serverName: kubernetes-dashboard
  insecureSkipVerify: true

---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
  name: kubernetes-dashboard-tls
  namespace: kube-system
spec:
  entryPoints:                      # [1]
    - websecure
  routes:                           # [2]
  - kind: Rule
    match:   Host(`kubernetes-prod.allarddcs.nl`) # [3]
    priority: 10                    # [4]
    services:                       # [8]
    - kind: Service
      name: kubernetes-dashboard
      namespace: kube-system
      port: 443                      # [9]
      serversTransport: kubernetes-dashboard-transport
  tls:                              # [11]
    certResolver: letsencrypt
