I am not sure whether its feasible to create a listeners in the envoy.yaml with multiple ports to bind for incoming traffic and then forward to a service on the same ports but a different address?
Example
All HTTP traffic on port 9200 -> Use server 10.1.1.10:9200
All HTTP traffic on port 5601 -> Use server 10.1.1.10:5601
I currently have created individual listeners and routes per listener.
For example
static_resources:
listeners:
- name: listener_http_elastic
address:
socket_address:
address: 0.0.0.0
port_value: 9200
filter_chains:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
stat_prefix: ingress_http
access_log:
- name: envoy.access_loggers.stdout
typed_config:
"@type": type.googleapis.com/envoy.extensions.access_loggers.stream.v3.StdoutAccessLog
route_config:
name: local_route
virtual_hosts:
- name: local_service
domains: ["*"]
routes:
- match:
prefix: "/"
route:
cluster: service_elastic
http_filters:
- name: envoy.filters.http.router
- name: listener_http_kibana
address:
socket_address:
address: 0.0.0.0
port_value: 5601
filter_chains:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
stat_prefix: ingress_http
access_log:
- name: envoy.access_loggers.stdout
typed_config:
"@type": type.googleapis.com/envoy.extensions.access_loggers.stream.v3.StdoutAccessLog
route_config:
name: local_route
virtual_hosts:
- name: local_service
domains: ["*"]
routes:
- match:
prefix: "/"
route:
cluster: service_kibana
http_filters:
- name: envoy.filters.http.router
clusters:
- name: service_elastic
connect_timeout: 0.25s
type: LOGICAL_DNS
# Comment out the following line to test on v6 networks
dns_lookup_family: V4_ONLY
load_assignment:
cluster_name: service_elastic
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: ${SERVICE_ELK}
port_value: 9200
- name: service_kibana
connect_timeout: 0.25s
type: LOGICAL_DNS
# Comment out the following line to test on v6 networks
dns_lookup_family: V4_ONLY
load_assignment:
cluster_name: service_kibana
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: ${SERVICE_ELK}
port_value: 5601
Any help or direction would be appreciated.