GoogleCloudPlatform / kubeflow-distribution

Blueprints for Deploying Kubeflow on Google Cloud Platform and Anthos
Apache License 2.0
80 stars 63 forks source link

GKE Ingress Bad Gateway or Backend not found #290

Closed dotnetpiper closed 3 years ago

dotnetpiper commented 3 years ago

Hi Team,

I've been using GKE and setup GKE Ingress mere to manage the path for all images which we have kept in GCR. I've created a .Net core based API which is has various path , if I expose the deployment with service as type Loadbalancer it works perfectly. Though when I utilize GKE Ingress and setup service and its backend it throws an error like Bad Gateway or sometime backend not found.

.Net core api application exposes following path when i exposed on service as loadbalancer, kindly follow below screenshot for reference: http://35.202.38.40/api/books http://35.202.38.40/api/categories

image

The same way we do have post api's.

Now I'm stuck when I utilize GKE ingress and setup my ingress.yaml as follows , it doesn't work and throws an error. Ingress.Yaml

`apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: gke-ingress annotations:

If the class annotation is not specified it defaults to "gce".

kubernetes.io/ingress.class: "gce"    

spec:
rules:

NOTE: my hello-word is exposing a .Net Core API application, kindly don't get confuse with name as "hello-world" for testing. image

Deployment and service Yaml

`apiVersion: apps/v1 kind: Deployment metadata: name: hello-world-deployment spec: selector: matchLabels: greeting: hello department: world replicas: 2 template: metadata: labels: greeting: hello department: world spec: containers:

Kindly advise how to setup path based routing in GKE Ingress for .Net Core Api app.

Bobgy commented 3 years ago

Hi @dotnetpiper the question does not seem to be related to Kubeflow. Can you ask Cloud Support for help?