Added http lb for lb

Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
Tuan-Dat Tran
2024-09-30 07:51:33 +02:00
parent 8fb4eaf610
commit 2cc4fd0be0
3 changed files with 33 additions and 3 deletions

View File

@@ -1,3 +0,0 @@
---
- include_tasks: installation.yml
- include_tasks: apps.yml

View File

@@ -14,3 +14,17 @@ stream {
proxy_pass k3s_servers;
}
}
http {
upstream k3s_servers {
{% for ip in k3s_server_ips %}
server {{ ip }};
{% endfor %}
}
server {
location / {
proxy_pass http://k3s_servers;
}
}
}