添加k8s-dash.home.com
在11机器上添加域名
[root@homelab-0-11 manifests]# cat /var/named/home.com.zone $TTL 600 ; 10 miutes @ IN SOA dns.home.com. dnsadmin.home.com. ( 2021111901 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum NS dns.home.com. $TTL 60 ; 1 miutes dns A 192.168.0.11 k8s-dash A 192.168.0.20 [root@homelab-0-11 manifests]# systemctl restart named
在nginx机器上配置转发
[root@k8s-manage conf.d]# cat /etc/nginx/conf.d/k8s-dash.home.com.conf server { # listen 80; # listen 443 ssl; listen 443 ssl http2; client_max_body_size 1000M; server_name k8s-dash.home.com; location / { proxy_pass https://192.168.0.11:30995; proxy_connect_timeout 180; proxy_send_timeout 180; proxy_read_timeout 180; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; access_log /var/log/nginx/k8s_dash_access.log; error_log /var/log/nginx/k8s_dash_error.log; } }
在win10上访问
浏览器打开:https://k8s-dash.home.com
不是对应的网址,大约过了10分钟,才更新为对应地址
解决方法
- 配置/var/named/home.com.zone的时候将2021111901 ; serial前滚一个,也就是2021111902 ; serial
- 或者更新windows dns缓存
原创文章,作者:站长,如若转载,请注明出处:https://wsppx.cn/2186/%e7%bd%91%e7%ab%99%e9%83%a8%e7%bd%b2/