I'm working with k8s and gcloud to deploy a multi-service application with Ingress being responsible for routing requests to a specific service. K8s and generally infrastructure is a new area of learning for me so it's been very trial and error so far, but now I have hit a wall.
I've been experimenting and building my deployment using minikube and I have created a yaml file that will successfully deploy everything locally on minikube without error. You can see the full deployment yaml file here: https://github.com/mwinteringham/restful-booker-platform/blob/kubes/kubes/deploy.yml
The issue I have run into is when I run the deployment on gcloud I am hitting 404s all over the place. With the current config, I am able to access rbp-ui by updating my /etc/hosts to point to rbp.info but attempt to access any other service endpoints I get a 404, meaning I can't get past my login screen.
The Ingress configuration is below and I believe I am missing something but I have no idea what.
apiVersion: extensions/v1beta1 kind: Ingress metadata: name: rbp-ingress annotations: nginx.ingress.kubernetes.io/rewrite-target: / spec: rules: - host: rbp.info http: paths: - path: /booking backend: serviceName: rbp-booking servicePort: 3000 - path: /room backend: serviceName: rbp-room servicePort: 3001 - path: /search backend: serviceName: rbp-search servicePort: 3002 - path: / backend: serviceName: rbp-ui servicePort: 3003 - path: /auth backend: serviceName: rbp-auth servicePort: 3004 - path: /report backend: serviceName: rbp-report servicePort: 3005 - path: /* backend: serviceName: rbp-ui servicePort: 3003
Some other things to add:
- I have left the deployment run for approx. 10 minutes to make sure the initial startup 404s are done
- All the services have a valid healthcheck endpoint, so gcloud informs that all backend services are healthy