Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
oliverpark999 opened this issue Mar 13, 2025 · 1 comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@oliverpark999
Copy link

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?

@oliverpark999 oliverpark999 added the kind/bug Categorizes issue or PR as related to a bug. label Mar 13, 2025
@shaneutt shaneutt added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Mar 13, 2025
@shaneutt shaneutt moved this to Triage in Gateway API Pipeline Mar 13, 2025
@howardjohn
Copy link
Contributor

That should be possible. Hard to say if you did something wrong or not since you didn't include the routes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
Status: Triage
Development

No branches or pull requests

3 participants