Created
April 21, 2020 08:48
-
-
Save alf-ytakada/3e68eacebaff7cd3d0d3522d497d3383 to your computer and use it in GitHub Desktop.
envoyをstandaloneで動かしてみる
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CentOS7へのインストール | |
# https://www.getenvoy.io/install/envoy/centos/ | |
# config参考 | |
# https://qiita.com/TokyoYoshida/items/8f614dc5051926bda605 | |
# https://i-beam.org/2019/02/03/envoy-static-load-balancer/ | |
# このコンフィグを、下記コマンドで動かそうとすると、 | |
# $ envoy --config-yaml config.yml | |
# error initializing configuration '': Unable to convert YAML as JSON: config.yml | |
# と言われてしまったので、jsonに変換して動かす。 | |
# $ envoy -c config.json | |
admin: | |
access_log_path: /tmp/admin_access.log | |
address: | |
socket_address: | |
address: 0.0.0.0 | |
port_value: 9901 | |
static_resources: | |
listeners: | |
- name: listener_0 | |
address: | |
socket_address: | |
address: 0.0.0.0 | |
port_value: 3306 | |
filter_chains: | |
- filters: | |
- name: envoy.filters.network.mysql_proxy | |
typed_config: | |
"@type": type.googleapis.com/envoy.config.filter.network.mysql_proxy.v1alpha1.MySQLProxy | |
stat_prefix: mysql | |
- name: envoy.filters.network.tcp_proxy | |
typed_config: | |
"@type": type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy | |
stat_prefix: tcp | |
cluster: mysql | |
clusters: | |
- name: mysql | |
type: strict_dns | |
connect_timeout: 1s | |
health_checks: | |
- healthy_threshold: 3 | |
interval: 5s | |
tcp_health_check: {} | |
timeout: 1s | |
unhealthy_threshold: 3 | |
load_assignment: | |
cluster_name: mysql | |
endpoints: | |
- lb_endpoints: | |
- endpoint: | |
address: | |
socket_address: | |
address: # ここにmysqlのIPアドレスを記載する | |
port_value: 3306 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment