Skip to content

Commit

Permalink
add IPv6 listen directive to nginx if enable_dual_stack_networks (#8596)
Browse files Browse the repository at this point in the history
  • Loading branch information
kakkotetsu authored Mar 7, 2022
1 parent 56d882a commit 58b2f39
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions roles/kubernetes/node/templates/loadbalancer/nginx.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 58b2f39

Please sign in to comment.