-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
49 lines (38 loc) · 1.45 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
load_module "/usr/lib64/nginx/modules/ngx_stream_module.so";
worker_processes 4;
worker_rlimit_nofile 40000;
events {
worker_connections 8192;
}
stream {
upstream kub_servers_http {
least_conn;
server kub-master01.lab.example.com:80 max_fails=3 fail_timeout=5s;
server kub-master02.lab.example.com:80 max_fails=3 fail_timeout=5s;
server kub-master03.lab.example.com:80 max_fails=3 fail_timeout=5s;
}
server {
listen 80;
proxy_pass kub_servers_http;
}
upstream kub_servers_https {
least_conn;
server kub-master01.lab.example.com:443 max_fails=3 fail_timeout=5s;
server kub-master02.lab.example.com:443 max_fails=3 fail_timeout=5s;
server kub-master03.lab.example.com:443 max_fails=3 fail_timeout=5s;
}
server {
listen 443;
proxy_pass kub_servers_https;
}
upstream kub_k8s_api_server_https {
least_conn;
server kub-master01.lab.example.com:6443 max_fails=3 fail_timeout=5s;
server kub-master02.lab.example.com:6443 max_fails=3 fail_timeout=5s;
server kub-master03.lab.example.com:6443 max_fails=3 fail_timeout=5s;
}
server {
listen 6443;
proxy_pass kub_k8s_api_server_https;
}
}