3
votes

I have a Kubernetes service that expose two ports, one for the external interface (target port 8080) and one for the admin interface (target port 8081). I'd like to make both of these endpoints accessible over the internet using https so thus I think I want use an ingress resource. The ingress resource creates a static IP for the load balancer and I'd like to route port 80 and 443 to the external interface (8080) and port 81 (http) and port 4431 (https) to the admin interface (8081). Is this possible and if so how?

1
I believe you can map the port when creating the service using Node Ports. This link (cloud.google.com/container-engine/docs/services/operations) has more information on how to create a service which might help.Faizan

1 Answers

3
votes

Via separate Ingress objects, you should be able to direct HTTP and HTTPS traffic to different ports and/or services, and hostnames can map to distinct ports and/or services.

However, Ingress currently assumes port 80 for HTTP and 443 for HTTPS for ingress, so it's not currently possible to direct traffic to ports 81 and 4431 via Ingress. I recommend using a different hostname for the admin interface.

Note that TLS is only supported in release 1.2.