V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
NGINX
NGINX Trac
3rd Party Modules
Security Advisories
CHANGES
OpenResty
ngx_lua
Tengine
在线学习资源
NGINX 开发从入门到精通
NGINX Modules
ngx_echo
ysicing
V2EX  ›  NGINX

非商业版本的 nginx 是否支持配置 health_check

  •  
  •   ysicing ·
    ysicing · 2018-05-22 19:26:58 +08:00 · 2969 次点击
    这是一个创建于 2159 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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"
    
    3 条回复    2018-05-22 20:53:02 +08:00
    digimoon
        1
    digimoon  
       2018-05-22 19:55:09 +08:00
    不支持
    yghack
        2
    yghack  
       2018-05-22 20:06:42 +08:00
    试试 nginx_upstream_check_module 吧
    ysicing
        3
    ysicing  
    OP
       2018-05-22 20:53:02 +08:00 via Android
    @yghack 回去我看看☺️
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2841 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 14:07 · PVG 22:07 · LAX 07:07 · JFK 10:07
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.