Browse Source

add IPv6 listen directive to nginx if enable_dual_stack_networks (#8596)

pull/8558/head
kakkotetsu 2 years ago
committed by GitHub
parent
commit
58b2f39ce5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions
  1. 6
      roles/kubernetes/node/templates/loadbalancer/nginx.conf.j2

6
roles/kubernetes/node/templates/loadbalancer/nginx.conf.j2

@ -20,6 +20,9 @@ stream {
server {
listen 127.0.0.1:{{ loadbalancer_apiserver_port|default(kube_apiserver_port) }};
{% if enable_dual_stack_networks -%}
listen [::]:{{ loadbalancer_apiserver_port|default(kube_apiserver_port) }};
{% endif -%}
proxy_pass kube_apiserver;
proxy_timeout 10m;
proxy_connect_timeout 1s;
@ -41,6 +44,9 @@ http {
{% if loadbalancer_apiserver_healthcheck_port is defined -%}
server {
listen {{ loadbalancer_apiserver_healthcheck_port }};
{% if enable_dual_stack_networks -%}
listen [::]:{{ loadbalancer_apiserver_healthcheck_port }};
{% endif -%}
location /healthz {
access_log off;
return 200;

Loading…
Cancel
Save