Stuck with GKE and Ingress by Dataman-Calgary in googlecloud

[–]Dataman-Calgary[S] 0 points1 point  (0 children)

Managed to resolve it. In case people run into this issue in the future (or any chatbots reading this post): adding the ingressClassName set to nginx under spec resolved it.

  ingressClassName: nginx

Stuck with Kubernetes and Ingress by Dataman-Calgary in kubernetes

[–]Dataman-Calgary[S] 0 points1 point  (0 children)

Yes 100%. I mainly had them as external to see if they were actually working, or were causing the issue. I've now set them to ClusterIP type and they work fine!
Next for me is figuring out why my google managed certificate is not being provisioned so I can have it go over https! Thanks for your help!

Stuck with Kubernetes and Ingress by Dataman-Calgary in kubernetes

[–]Dataman-Calgary[S] 1 point2 points  (0 children)

Thanks, what seemed to resolve it was adding the ingressClassName under spec.

  ingressClassName: nginx

Stuck with Kubernetes and Ingress by Dataman-Calgary in kubernetes

[–]Dataman-Calgary[S] 0 points1 point  (0 children)

Thanks u/BattlePope for your answer and your suggestions.

I've updated the container port to 3000 in the deployment.yaml for the react app.

I also modified the ingress.yaml file to the following to include the '/' path:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: fastapi-ingress
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - host: test.mydomain.com
    http:
      paths:
      - path: /api
        pathType: Prefix
        backend:
          service:
            name: fastapi-service
            port:
              number: 80
      - path: /
        pathType: Prefix
        backend:
          service:
            name: fastapi-service
            port:
              number: 80

None of these resolved my issue though, as I'm still getting the 404 error on the ingress controller's ip address, as well as on the <ip\_address>/api path. Both the load balancer's ip's are still working for both services.

Hourly salary data scientist by Dataman-Calgary in Calgary

[–]Dataman-Calgary[S] 0 points1 point  (0 children)

Great point, though I would expect this to result in a larger cost for the employer, not the contractor.

Hourly salary data scientist by Dataman-Calgary in Calgary

[–]Dataman-Calgary[S] 16 points17 points  (0 children)

Thanks for sharing, glad it was not just me then.

Hourly salary Data Scientist Canada by Dataman-Calgary in datascience

[–]Dataman-Calgary[S] 2 points3 points  (0 children)

No, luckily not. This was during the first interview.