Search code examples
angularkuberneteskubernetes-ingressquarkusquarkus-rest-client

Enable to reach endpoint 404 error code - Deployed application


I'm deploying my application in the cloud, inside a cluster on 03 pods:

  1. one pod: backend - Quarkus
  2. one pod: frontend - Angular
  3. one pod: DB - Postgres

The backend has 03 endpoints:

  1. One endpoint: GraphQL
  2. Two endpoints: Rest

The pods are exposed:

  1. backend: ClusterIp
  2. DB: ClusterIp
  3. frontend: NodePort

I have an Ngnix web server & 02 ingress manifests; one for the backend and a second for the frontend:

1- backend-ingress:

    apiVersion: networking.k8s.io/v1
    kind: Ingress
    metadata:
      name: mcs-thirdparty-back-ingress
      namespace: namespace
      annotations:
        nginx.ingress.kubernetes.io/use-regex: "true"
    spec:
      ingressClassName: nginx-internal
      rules:
      - host: backend.exemple.com
        http:
          paths:
          - path: /
            backend:
              service:
                name: mcs-thirdparty-backend
                port:
                  number: 8080
            pathType: Prefix

2- frontend-ingress:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: mcs-thirdparty-ingress
  namespace: namespace
spec:
  ingressClassName: nginx-internal
  rules:
  - host: bilels.exemple.com
    http:
      paths:
      - path: /
        backend:
          service:
            name: mcs-thirdparty-frontend
            port:
              number: 80
        pathType: Prefix

For the GraphQL endpoint/request; the frontend can correctly communicate with the backend and fetchs the required data. When I run the POST request to fetch the accessToken from the server (Rest Endpoint), I receive the 404 error code.

The error screenshot is here

I tried to add several changes in the backend-ingress manifest, but always 404 - path: /(.*) - path: /* - path: /response


Solution

  • I thinks that I managed to make another Diagnotic method wiht the help for Ryan Dawson. I did PortForaward the backend pod and request from the locally, then I found that there is a 500 error code --> meaning that the request was not matching the api requirements: in the frontend I was sendign the wrong context type.

    --> so the ingress config is already in a good shape.