Skip to content

Instantly share code, notes, and snippets.

@alicek106
Created June 14, 2020 07:34
Show Gist options
  • Save alicek106/c25a7febd756d734bd1737f05d8f2fe0 to your computer and use it in GitHub Desktop.
Save alicek106/c25a7febd756d734bd1737f05d8f2fe0 to your computer and use it in GitHub Desktop.
Envoy basic YAML setting
node:
id: node0 # 고유한 envoy node의 ID
cluster: cluster.local
admin: # Envoy는 자체적으로 Admin 페이지를 제공한다.
access_log_path: /tmp/admin_access.log
address:
socket_address: { address: 0.0.0.0, port_value: 9900 } # 9900 포트로 Admin 접근 가능
static_resources:
# 리스터 설정
listeners:
- name: listener_0
address:
socket_address: { address: 0.0.0.0, port_value: 80 }
# Filter 설정
filter_chains:
- filters:
- name: envoy.filters.network.http_connection_manager
config:
stat_prefix: ingress_http
http_filters:
- name: envoy.filters.http.router
# Route 설정
route_config:
name: route
virtual_hosts:
- name: nginx_service
domains: ["nginx.local"]
routes:
- match:
prefix: "/alicek106"
route:
cluster: nginx_cluster # Nginx Cluster로 라우팅
# 클러스터 설정
clusters:
- name: nginx_cluster # Nginx cluster
type: STRICT_DNS
connect_timeout: 0.25s
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: nginx_cluster
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address: { address: nginx1, port_value: 80 }
- endpoint:
address:
socket_address: { address: nginx2, port_value: 80 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment