I have a kubernetes cluster running in AWS. Kubes worker are in private subnet, and Master is in public subnet.

the cluster is working fine. now i would be doing a deployment with 3 container within a pod , and 3 ports would be exposed as service for those container.

i want to access this pods from internet. i.e outside.

we cant deploy loadbalancer for each pod, as there are going to 500 pods how can we do this

  • @jordan liggitt can u please help Jan 3, 2018 at 13:41

1 Answer 1


I know we discussed this over slack, but I thought I'd answer the question here too, so others might be aware of a possible solution.

From what I understood you are after an ingress controller which can be used to route incoming traffic to the service/deployment requested.

i.e; this.example.com would be your domain.

You've deployed a pod consisting of multiple containers.

Theoretically you could have the following ingress setup;

apiVersion: extensions/v1beta1 kind: Ingress metadata: name: my-ingress annotations: kubernetes.io/ingress.class: nginx ingress.kubernetes.io/rewrite-target: / spec: tls: - hosts: - this.example.com secretName: my-tls rules: - host: this.example.com http: paths: - path: /one backend: serviceName: this-deploy servicePort: 80 - path: /two backend: serviceName: this-deploy servicePort: 9000 - path: /three backend: serviceName: this-deploy servicePort: 8080

In this ingress we've specified the same service, but each of which have different ports.

When a user navigates to this.example.com/one The traffic comes into the Ingress Controller setup, it checks for any matching rules and if there are some directs the traffic to the service.

The service itself will have an endpoint, which the traffic is directed to. This would be the pod, (or if you have many replicas any one of them).

These resources might be of assistance in setting up an ingress controller.

https://hub.kubeapps.com/charts/stable/nginx-ingress https://github.com/kubernetes/ingress-nginx

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .