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

TCPRoute don't connects to Gateway #5491

Closed
1 task done
dennisarmbruster95 opened this issue Jan 26, 2024 · 2 comments
Closed
1 task done

TCPRoute don't connects to Gateway #5491

dennisarmbruster95 opened this issue Jan 26, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@dennisarmbruster95
Copy link

dennisarmbruster95 commented Jan 26, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Hello everyone,

I want to deploy a TCPRoute that forwards a message from a gateway to my service:

apiVersion: gateway.networking.k8s.io/v1alpha2
kind: TCPRoute
metadata:
  name: route
spec:
  parentRefs:
  - name: kong-gateway
    namespace: ingress
    sectionName: mqtt
  rules:
  - backendRefs:
    - name: mqtt-broker
      kind: Service
      port: 1883

This does not work, or I do not receive any messages on my service. For example, if I try to forward the messages to my service with a TCPIngress, this works. However, I would like to use TLS termination later and forward messages to my service later. I would therefore like to use the Gateway API in my cluster.

No status information is displayed in the description of the TCP route. Nothing can be seen in the Kong logs either.
I had tried other route types for testing and only with the HTTP route could I see in the status whether the route is connected to the gateway or not. I could also see the HTTP route in the Kong logs.

On further inspection of the Kong logs, I noticed the following section:

time="2024-01-25T14:44:55Z" level=info msg="Starting EventSource" logger=controllers.Gateway source="kind source: *v1beta1.Gateway"
time="2024-01-25T14:44:55Z" level=info msg="Starting EventSource" logger=controllers.Gateway source="kind source: *v1beta1.GatewayClass"
time="2024-01-25T14:44:55Z" level=info msg="Starting EventSource" logger=controllers.Gateway source="kind source: *v1.Service"
time="2024-01-25T14:44:55Z" level=info msg="Starting EventSource" logger=controllers.Gateway source="kind source: *v1beta1.HTTPRoute"
time="2024-01-25T14:44:55Z" level=info msg="Starting EventSource" logger=controllers.Gateway source="kind source: *v1beta1.ReferenceGrant"

I'm not sure if this is how it should be, but it seems to me that the other route types are missing here, such as TCPRoute.

Expected Behavior

TCPRoute forwards messages to my service and I can see the status of the TCPRoute in the description.

Steps To Reproduce

My setup:
- Installed Kong helm chart with version 3.1
- Enabled KIC
- stream_listen: 0.0.0.0:1883
- Proxy enabled
- Proxy Stream settings: containerPort: 1883, servicePort: 1883, protocol: TCP
- Deployed GatewayClass with controllerName: konghq.com/kic-gateway-controller
- Deployed Gateway with Listener: port: 1883, protocol: TCP and allows TCPRoute from all namespaces

Kong Ingress Controller version

v2.12.3

Kubernetes version

Client Version: v1.28.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.24.15
WARNING: version difference between client (1.28) and server (1.24) exceeds the supported minor version skew of +/-1

Anything else?

I'm not sure if this is a bug or a faulty configuration on my part. I have also tried the following guidline and find the same behavior: https://docs.konghq.com/kubernetes-ingress-controller/latest/guides/services/tcp/

@dennisarmbruster95 dennisarmbruster95 added the bug Something isn't working label Jan 26, 2024
@randmonkey
Copy link
Contributor

randmonkey commented Jan 29, 2024

Have you enabled feature gate GatewayAlpha? See: https://docs.konghq.com/kubernetes-ingress-controller/2.12.x/references/feature-gates/
The resources in gateway v1alpha2 (TCPRoute,UDPRoute,GRPCRoute) is not reconciled by default. You need to enable the GatewayAlpha feature gate which is disabled by default to reconcile them.

@dennisarmbruster95
Copy link
Author

@randmonkey you are my hero. This was my error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants