Web App deployed in Kubernetes (AKS) 1.19 version returns 404 Page not found Web App deployed in Kubernetes (AKS) 1.19 version returns 404 Page not found kubernetes kubernetes

Web App deployed in Kubernetes (AKS) 1.19 version returns 404 Page not found


Since the problem is not clear from the description, I am going to suggest following items for debugging.

  1. Tail the logs of traefik controller pods to make sure you are getting traffic when you access the target URL. Beware of browser caches, either do cURL or browse using a new incognito window. Tail logs from all controller pods, you may have multiple pods handling the traffic. If you don't see any hits in the controller logs, there could be multiple issues. Check if your ingress controller is exposed correctly. Check the services running in the cluster by running kubectl get svc -A. See if traefik service is type LB. Get the service description and note any issues in the events section. If it's not configured and you see errors, delete the traffic chart and redeploy it. If it still doesn't come up right, open a support ticket with Azure team from the portal. However, if the LB is bound correctly. Check if you have access to the subnet where LB is running. There could also be a case where you have multiple ingress controllers installed and you hit the wrong controller. In that case, you should have multiple LB's created as well. Make sure you hitting the desired LB.

  2. If you see errors in the logs, follow the errors. It will show upstream errors if it can't find the underlined services or if pods are denying traffic.

  3. Ingress controllers are reverse proxies that are configured through kubernetes objects. If you are using path based routing, make sure your application listens on the path. For example, the backend traffic is being redirected to the /api path. If the app listens on / instead then it would fail. Also check-out rewrite-target and related annotations for proper configuration.

  4. If you are using host based routing, make sure you are accessing the services with the correct hostname. Get a DNS name for the LB IP, alternatively modify you hosts file and then try the URL.