#!/bin/bash MAX=8025 echo " admin: access_log_path: /tmp/admin_access.log address: socket_address: { address: 127.0.0.1, port_value: 9901 } static_resources: listeners: " for i in $(eval echo "{1025..$MAX}") do echo " - name: listener_$i address: socket_address: { address: 127.0.0.1, port_value: 1$i } 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 codec_type: AUTO route_config: name: local_route virtual_hosts: - name: local_service domains: [\"*\"] routes: - match: { prefix: \"/$i\" } route: { cluster: some_service_$i } http_filters: - name: envoy.filters.http.router " done echo " clusters: " for i in $(eval echo "{1025..$MAX}") do echo " - name: some_service_$i connect_timeout: 0.25s type: STATIC lb_policy: ROUND_ROBIN load_assignment: cluster_name: some_service_$i endpoints: - lb_endpoints: - endpoint: address: socket_address: address: 127.0.0.1 port_value: $i " done