---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: kubernetes-dashboard
  namespace: kubernetes-dashboard
  annotations:
    nginx.ingress.kubernates.io/rewrite-target: /$2
    nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
    nginx.ingress.kubernetes.io/use-regex: "true"
spec:
  rules:
    - host: example.com
      http:
        paths:
        - path: /dashboard(/|$)(.*)
          pathType: Prefix
          backend:
            service: 
              name: kubernetes-dashboard
              port: 
                number: 443

