admin管理员组文章数量:1122832
I installed rancher and k3s on 3 VMs: 192.168.0.150 control plane 192.168.0.151 worker 192.168.0.152 worker
I followed the tutorial to configure nginx:
worker_processes 4;
worker_rlimit_nofile 40000;
load_module /usr/lib/nginx/modules/ngx_stream_module.so;
events {
worker_connections 8192;
}
stream {
upstream rancher_servers_http {
least_conn;
server 192.168.0.150:80 max_fails=3 fail_timeout=5s;
server 192.168.0.151:80 max_fails=3 fail_timeout=5s;
server 192.168.0.152:80 max_fails=3 fail_timeout=5s;
}
server {
listen 80;
proxy_pass rancher_servers_http;
}
}
http {
upstream rancher_servers_https {
least_conn;
server 192.168.0.150:443 max_fails=3 fail_timeout=5s;
server 192.168.0.151:443 max_fails=3 fail_timeout=5s;
server 192.168.0.152:443 max_fails=3 fail_timeout=5s;
}
server {
listen 443 ssl;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_certificate /cert/tls.crt;
ssl_certificate_key /cert/tls.key;
ssl_trusted_certificate /cert/cacerts.pem;
error_log /var/log/nginx/rancher_error_log error;
location / {
proxy_pas https://rancher_servers_https;
proxy_set_header Host rancher.example;
proxy_ssl_server_name on;
proxy_ssl_name rancher.example;
add_header Access-Control-Allow-Origin *;
}
}
}
I access Rancher and I get the login page using the url example
but I get the following errors when I try to connect:
"An error occurred logging in: Network Error"
and in my browser debugger: "Access to XMLHttpRequest at '' from origin '' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource."
what did i forget to do?
Thanks for your help
本文标签: Rancher Setting up an external NGINX Load BalancerStack Overflow
版权声明:本文标题:Rancher Setting up an external NGINX Load Balancer - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736308823a1933798.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论