ansible/roles/loadbalancer/templates/nginx.conf.j2

17 lines
234 B
Django/Jinja

include /etc/nginx/modules-enabled/*.conf;
events {}
stream {
upstream k3s_servers {
{% for ip in k3s_server_ips %}
server {{ ip }}:6443;
{% endfor %}
}
server {
listen 6443;
proxy_pass k3s_servers;
}
}