nginx/1.13.12
# kube.conf
upstream kubeapi {
least_conn;
zone kube_api_zone 64k;
server 192.168.8.228:6443 max_fails=1 fail_timeout=30s;
server 10.10.10.227:6443 max_fails=1 fail_timeout=30s;
server 192.168.8.229:6443 max_fails=1 fail_timeout=30s;
}
server {
listen 127.0.0.1:6443;
proxy_pass kubeapi;
proxy_timeout 10m;
proxy_connect_timeout 1s;
health_check;
}
如果配置了,会提示提示unknown directive "health_check" in /etc/nginx/conf/sites_stream/kube.conf:13
,是我的姿势不对么,基于 nginx 镜像,微调了 log 部分,还是是ngx_stream_upstream_hc_module
在编译时就有配置上么?
附上:
#docker-compose.yaml
version: '2.1'
services:
tcp-proxy:
image: spanda/proxy:tcp
container_name: tcp-proxy
volumes:
- /tmp/nginx/sites_stream:/etc/nginx/conf/sites_stream
- /tmp/nginx/sites_http:/etc/nginx/conf/sites_http
- /tmp/nginx/ssl:/etc/nginx/conf/ssl
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "3"
network_mode: "host"
1
digimoon 2018-05-22 19:55:09 +08:00
不支持
|
2
yghack 2018-05-22 20:06:42 +08:00
试试 nginx_upstream_check_module 吧
|