Skip to content

GKE Ingress config requires a single host with multiple paths #94

@BennetVellaExient

Description

@BennetVellaExient

If you want to configure GKE Ingress with multiple backends for the same host, you must have a single rule with a single host and multiple paths. Otherwise, the GKE ingress controller provisions only one backend service

Source: https://cloud.google.com/kubernetes-engine/docs/concepts/ingress#multiple_backend_services

But the helm ingress.yaml creates multiple hosts:

- host: {{ .Values.windmill.baseDomain | quote }}

Can confirm that combining the paths under a single host correctly updated the load balancer to map properly

So as a practical example, what I was getting by default helm configuration:

 spec:
    rules:
    - host: windmill.blabla
      http:
        paths:
        - backend:
            service:
              name: windmill-lsp
              port:
                number: 3001
          path: /ws/
          pathType: Prefix
    - host: windmill.blabla
      http:
        paths:
        - backend:
            service:
              name: windmill-app
              port:
                number: 8000
          path: /
          pathType: Prefix

For GKE, the expected setup should be as follows:

 spec:
    rules:
    - host: windmill.blabla
      http:
        paths:
        - backend:
            service:
              name: windmill-lsp
              port:
                number: 3001
          path: /ws/
          pathType: Prefix
        - backend:
            service:
              name: windmill-app
              port:
                number: 8000
          path: /
          pathType: Prefix

I don't know if a shared host with multiple paths might then conflict with a different provider, but can confirm that GKE requires a single host.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions