nginx-ingress shows HTTP Error 404 for a react app deployed on Domain path, but works for subdomain path

Viewed 427

Here is my ingress:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: 8link-app-kubernetes-ingress
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/use-regex: "true"
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - host: link8.in
    http:
      paths:
      - backend:
          service:
            name: link8-app-prod-svc
            port:
              number: 80
        path: /
        pathType: Prefix
  - host: test.link8.in
    http:
      paths:
      - backend:
          service:
            name: link8-app-prod-svc
            port:
              number: 80
        path: /
        pathType: Prefix

In the above ingress, I have the same Front-end service which is defined to be run on both Domain and sub-domain (for the testing), it is working for sub-domain but not for the domain.

I get Error 404 on domain path: enter image description here

Following is my DNS settings, where value is my Ingress Address: enter image description here

UPDATE:

enter image description here

1 Answers

In order to clear things for anyone, who will try to figure out the answer.

The question was answered by the author.

The problem was not in Kubernetes resources of any kind, it was a browser-specific issue, clearing the browser storage solved the problem.

my problem wasn't related to k8s;
it was working from start.
Just I had to clear everything for my domain in chrome storage


enter image description here

Related