Is possible to configure ingress via PORT base routing?

Hello I am new to GKE in Kubernetes:)
i would like to use ingress controller for my project
here we are using haproxy ingress controller and able to use ingress via PATH base but we want to use PORT base routing.
is this possible to configure ingress via PORT base routing?

Not directly. The ingress API only has support for path based routing. Several ingress controllers have been extended to support port based routing through additional configuration via configmaps or annotations.

Thanks @mrbobbytables rbobbytables i have exposed tcp-udp-services… but not worked for PORT base routing

here is my details


apiVersion: extensions/v1beta1
kind: Ingress
name: example-ingress
annotations: /

  • http:
    - path: /tomcat
    serviceName: tomcat
    servicePort: 8080
    - path: /httpd
    serviceName: httpd
    servicePort: 80

kubectl describe configmap tcp-services
Name: tcp-services
Namespace: ingress-nginx



Did you open up the additional ports for the ingress service itself?

No not opened any port is that required

I am new to this can you please elaborate more on this as my path base routing is working

Yes, it can’t do port based routing otherwise. If you look at the nginx example they add the additional ports to the ingress service.

Oki let me try

@mrbobbytables @experts

i have followed the this documentation Using Helm for created the ingress controller as well as i want to expose the external IP via LoadBalancer and path base routing is working.

as this is loadbalancer configuration how can i open the port for service

can you please help me out to achieve PORT base routing

The LoadBalancer service needs to have the additional ports you want forwarded added to it. An example is included at the Nginx Ingress - Exposing TCP and UDP Services Documentation.

Vikas, it’s already been explained well. If you still want some fix, inbox me. We may connect locally over phone or email if you want.

Hi @ashwini Please share your email ID or send a test mail to i will be very happy to connect to you

You can actually use discuss to message privately. You may want to do that and edit your post so that your email isn’t spidered and indexed :grimacing: