Skip to content

Is it possible to access a different service with a port from the same hostname? #3679

@oliverpark999

Description

@oliverpark999

Hi,

  • Gateway-API NLB Listeners Port 80, 800, 8888

  • Gateway-API Manifest Port

spec:
  gatewayClassName: istio
  listeners:
    - allowedRoutes:
        namespaces:
          from: All
      hostname: '*.foobar'
      name: http
      port: 80
      protocol: HTTP

    - allowedRoutes:
        namespaces:
          from: All
      hostname: '*.foobar'
      name: foobar-b
      port: 800
      protocol: HTTP

    - allowedRoutes:
        namespaces:
          from: All
      hostname: '*.foobar'
      name: foobar-c
      port: 8888
      protocol: HTTP
- httpRoute
{...}
hostnames:
- test.frist.second.foobar
{...}
service:
  type: ClusterIP
  ports:
    - port: 80
      protocol: TCP
      name: foobar-a
      targetPort: 8000
    - port: 800
      protocol: TCP
      name: foobar-b
      targetPort: 800
    - port: 8888
      protocol: TCP
      name: foobar-c
      targetPort: 8888
  • test.frist.second.foobar/foobar 접속 => Connect traffic to 80 service

  • test.frist.second.foobar:800/foobar 접속 => Connect traffic to 800 service

  • test.frist.second.foobar:8888/foobar 접속 => Connect traffic to 8888 service

Even if I call it by specifying the listeners Port in hostname 'test.frist.second.foobar', it is connected to the same 80 service. Is it possible to access a different service with a port from the same hostname?

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions