windows server 2019 配置k8s worker的proxy
安装nginx.exe,编写配置文件nginx.conf:error_log /var/log/nginx.log notice;pid/var/log/nginx.pid;worker_rlimit_nofile 8192;worker_processes auto;events {multi_accept on;worker_connections 40...
·
安装nginx.exe,编写配置文件nginx.conf:
error_log /var/log/nginx.log notice;
pid /var/log/nginx.pid;
worker_rlimit_nofile 8192;
worker_processes auto;
events {
multi_accept on;
worker_connections 4096;
}
stream {
upstream kube_apiserver {
least_conn;
server 192.168.100.156:6443;
server 192.168.100.157:6443;
server 192.168.100.158:6443;
}
server {
listen 127.0.0.1:6443 so_keepalive=on;
access_log off;
proxy_pass kube_apiserver;
proxy_timeout 10m;
proxy_connect_timeout 1s;
}
}
执行nginx.exe -t -c nginx.conf
此外,修改c:\k\config
将其中的192.168.100.156:6443修改为127.0.0.1:6443,重启
更多推荐
已为社区贡献12条内容
所有评论(0)