qikqiak.com
qikqiak.com copied to clipboard
envoy新版本好像已经弃用hosts了,改用endpoints了
这个要去看新版本的文档哈,后续更新下
这是我最近入门学习的一个TCP代理示例,供您参考,其他的我还在慢慢学习 [root@localhost envoy]# cat envoy.yaml static_resources: listeners: name: listener_0 address: socket_address: { address: 0.0.0.0, port_value: 80 } filter_chains: - filters: - name: envoy.tcp_proxy typed_config: "@type": type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy stat_prefix: tcp cluster: test_cluster
clusters:
- name: test_cluster
connect_timeout: 10s
type: STATIC
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: test_cluster
endpoints:
- lb_endpoints:
- endpoint: address: socket_address: { address: 127.0.0.1, port_value: 8081 }
- lb_endpoints: