How to remove unused ports from AWS load balancer created by istio?

7/9/2019

When i install istio in k8s, it create a load balancer in AWS. This loadbalancer are created with some ports, like 15020, 15029, 15030, etc... How i can remove unused ports from AWS Load Balancer? I don't use some port and i want to remove during the creation of the load balancer.

For example. If i want to remove the 15020 port. How i can do that?

I tried to edit some rules in helm-values.yaml, but without success.

I want to remove unused ports because i want to put some inbound rules into load balancer, but AWS have a limitation for each security group.

Here i show how i put inbound rules. Its works, but if i have many ports, AWS don`t acept all ip ranges that i desire.

gateways:
  istio-ingressgateway:
    loadBalancerSourceRanges: [10 IPRANGES]

Thank you.

-- Victor Lopes
amazon-web-services
istio
kubernetes
kubernetes-helm

1 Answer

7/9/2019

You can override the default ports in your values.yaml like so (listed ports are the defaults):

    gateways:
      istio-ingressgateway:
        enabled: true
        ports:
        - port: 15020
          targetPort: 15020
          name: status-port
        - port: 80
          targetPort: 80
          name: http2
          nodePort: 31380
        - port: 443
          name: https
          nodePort: 31390
        - port: 31400
          name: tcp
          nodePort: 31400
        - port: 15029
          targetPort: 15029
          name: https-kiali
        - port: 15030
          targetPort: 15030
          name: https-prometheus
        - port: 15031
          targetPort: 15031
          name: https-grafana
        - port: 15032
          targetPort: 15032
          name: https-tracing
        - port: 15443
          targetPort: 15443
          name: tls

See also for default configuration: https://github.com/istio/istio/blob/master/install/kubernetes/helm/istio/charts/gateways/values.yaml

-- Christopher Bohlen
Source: StackOverflow