RKE 版本:
RKE version: v1.3.12
Docker 版本: (docker version
,docker info
)
Version: 20.10.9
操作系统和内核: (cat /etc/os-release
, uname -r
)
Centos 7.9 Linux nginx 5.18.14-1.el7.elrepo.x86_64
主机类型和供应商: (VirtualBox/Bare-metal/AWS/GCE/DO)
VMware exsi
cluster.yml 文件:
#cat cluster.yml
nodes:
- address: 192.168.10.12
user: rancher
role: [controlplane,etcd,worker]
- address: 192.168.10.13
user: rancher
role: [controlplane,etcd,worker]
- address: 192.168.10.14
user: rancher
role: [controlplane,etcd,worker]
services:
etcd:
backup_config:
enabled: true
interval_hours: 12
retention: 6
kube-controller:
extra_args:
node-monitor-period: '5s'
node-monitor-grace-period: '20s'
node-startup-grace-period: '30s'
pod-eviction-timeout: '1m'
kubelet:
extra_args:
pod-infra-container-image: 'rancher/pause:3.1'
max-pods: "110"
system-reserved: 'cpu=0.3,memory=250Mi'
kube-reserved: 'cpu=0.3,memory=250Mi'
eviction-hard: 'memory.available<500Mi,nodefs.available<10%,imagefs.available<10%,nodefs.inodesFree<5%'
eviction-soft: 'memory.available<500Mi,nodefs.available<15%,imagefs.available<15%,nodefs.inodesFree<10%'
eviction-soft-grace-period: 'memory.available=1m30s,nodefs.available=1m30s,imagefs.available=1m30s,nodefs.inodesFree=1m30s'
eviction-max-pod-grace-period: '30'
eviction-pressure-transition-period: '30s'
network:
plugin: canal
options:
flannel_backend_type: "vxlan"
private_registries:
- url: harbor.example.com #harbor VIP地址
user: admin
password: haha123!* #harbor密码
is_default: true
ingress:
provider: nginx
options:
use-forwarded-headers: "true"
nginx.conf配置
#cat /root/nginx/nginx.conf
worker_processes 4;
worker_rlimit_nofile 40000;
events {
worker_connections 8192;
}
http {
upstream rancher {
hash $request_uri consistent;
server 192.168.10.12:30080 max_fails=3 fail_timeout=5s;
# server 192.168.10.13:30080 max_fails=3 fail_timeout=5s;
# server 192.168.10.14:30080 max_fails=3 fail_timeout=5s;
}
map $http_upgrade $connection_upgrade {
default Upgrade;
'' close;
}
server {
listen 443 ssl;
server_name rancher266.example.com;
ssl_certificate /etc/nginx/ssl/tls.crt;
ssl_certificate_key /etc/nginx/ssl/tls.key;
proxy_read_timeout 3000;
proxy_connect_timeout 3000;
proxy_send_timeout 3000;
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://rancher;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
# This allows the ability for the execute shell window to remain open for up to 15 minutes.
## Without this parameter, the default is 1 minute and will automatically close.
proxy_read_timeout 900s;
proxy_buffering off;
}
}
server {
listen 80;
server_name rancher266.example.com;
return 301 https://$server_name$request_uri;
}
}
重现步骤:
点击登录
然后立马就又返回到登录界面了
登录时有时候会提示如下:
每次退出后,要登录5次以上才能正常登录。
各位有什么排错思路可以提供下,多谢多谢!