Skip to content

Instantly share code, notes, and snippets.

@dyrnq
Created September 22, 2022 06:12
Show Gist options
  • Select an option

  • Save dyrnq/8d40ba060dbbfdc1086a45c1f416ac1f to your computer and use it in GitHub Desktop.

Select an option

Save dyrnq/8d40ba060dbbfdc1086a45c1f416ac1f to your computer and use it in GitHub Desktop.
envoy tcp_proxy
static_resources:
listeners:
- name: listener_0
address:
socket_address:
address: 0.0.0.0
port_value: 10000
filter_chains:
- filters:
- name: envoy.filters.network.tcp_proxy
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy
stat_prefix: destination
cluster: some_service
clusters:
# - name: cluster_0
# connect_timeout: 30s
# type: LOGICAL_DNS
# dns_lookup_family: V4_ONLY
# load_assignment:
# cluster_name: cluster_0
# endpoints:
# - lb_endpoints:
# - endpoint:
# address:
# socket_address:
# address: www.example.com
# port_value: 80
- name: some_service
connect_timeout: 0.25s
type: STATIC
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: some_service
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address: { address: 192.168.27.11, port_value: 6443 }
- endpoint:
address:
socket_address: { address: 192.168.27.12, port_value: 6443 }
- endpoint:
address:
socket_address: { address: 192.168.27.13, port_value: 6443 }
@dyrnq
Copy link
Author

dyrnq commented Sep 22, 2022

docker run --name envoyproxy \
-d -p 8443:10000 \
-v $PWD/envoy_static.yaml:/envoy_static.yaml:ro envoyproxy/envoy:v1.23-latest -c /envoy_static.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment