'How To Solve Kibana Dashboard "404" display error?

I am trying to set up authentication with Okta for elastic stack on google cloud. The link from OKTA has the first step to route the cluster address through a certain endpoint and path as shown here

Well, I have an ingress shown thus:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: kibana-ingress
  annotations:
    kubernetes.io/ingress.class: "gce"
spec:
  tls:
  - hosts:
      - x.x.x.net
  rules:
  - host: x.x.x.net
    http:
      paths:
      - path: /api/security/v1/saml
        pathType: Prefix
        backend:
          service:
            name: kibana-kibana
            port:
              number: 5601

But every time, I tried to check the hosts from the browser with the path identified as well, it gives an error page as shown thus:

{"statusCode":404,"error":"Not Found","message":"Not Found"}

WHat could possibly cause this that I cannot access the hosts from my browser meanwhile if I remove the path, the dashboard is accessible.

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source