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

Rule set to redirect ports for TCP #101

Open
rasticek opened this issue Oct 17, 2024 · 2 comments
Open

Rule set to redirect ports for TCP #101

rasticek opened this issue Oct 17, 2024 · 2 comments

Comments

@rasticek
Copy link

Hi,

I would like to setup OCI LB for Kafka deployment by utilizing ClusterIP services with Ingress (for Kafka I am using https://github.com/bitnami/charts/tree/main/bitnami/kafka/#installing-the-chart). I am using 3 controllers/brokers for Kafka.
Such setup is documented/working with nginx LB using config maps but I'm not able to configure similar with oci-native-ingress-controller. Anyway, when I configure it manually (the LB on OCI) it is working as expected.

Brief description:

  1. The Kafka service is exposed externally on 3 pods = 3 IP addresses with same Port> E.g., IP1:9095, IP2:9095, IP3:9095
  1. The OCI LB for this is correctly set using Ingress with one Listener (on port 9095) with Backend Set with 3 backends (IP1:9095, IP2:9095, IP3:9095).
  1. The Kafka is redirecting "initial" request (on Service) from client to the one of 3 Endpoints on same OCI LB which are distinguished by 3 different Ports and LB should the direct it to the right Enpoint based on the port - I am able to configure this manually but not using oci-native-ingress-controller.
  1. E.g., LB:9096 should redirect to IP1:9095, LB:9097 should redirect to IP2:9095, LB:9098 should redirect to IP3:9095,
  2. So, the LB configuration should be 3 listeners > Listener on port 9096 with Backend Set and one backed IP1:9095, Listener on port 9097 with Backend Set and one backed IIP2:9095, Listener on port 9098 with Backend Set and one backed IP3:9095

Nginx is using config maps on controller deployment and this is then propagated on Ingress and into LB afterwards .
Sample config map

apiVersion: v1
kind: ConfigMap
metadata:
  name: tcp-ingress-4-kafka-ing
  namespace: kafka-ingress
data:
  9096: "kafka-ingress/kafka-ing-controller-0-external:9095"
  9097: "kafka-ingress/kafka-ing-controller-1-external:9095"
  9098: "kafka-ingress/kafka-ing-controller-2-external:9095"

Is it possible to achieve this configuration using oci-native-ingress-controller with Ingress or is this functionality missing so far please?

Thank you.

@nirpai
Copy link
Contributor

nirpai commented Oct 17, 2024

In general native ingerss controller creates one listener for each service port and one backend set for all backends of that service. So have you tried creating 3 different services with respective listener port/backend configuration?

@rasticek
Copy link
Author

Hi, yes I've tried already. Unfortunately it keeps failing because within kube it has same target port and/or the service is not exposed for these controllers on this port, it is just endpoint (not service). I believe that this is because example from nginx uses config map approach in this case.
Is it possible to get to the configuration I described using oci-native-ingress-controller please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants