alibaba / kt-connect

A toolkit for Integrating with your kubernetes dev environment more efficiently
https://alibaba.github.io/kt-connect/#/
GNU General Public License v3.0
1.51k stars 230 forks source link

connect使用 tun2socks ,localDns 没办法解析DNS阿里云 PrivateZone 域名 #385

Closed Danny5487401 closed 1 year ago

Danny5487401 commented 1 year ago

connect 之后本地解析不了 PrivateZone. image

是否是 tun2socks的问题:就是域名解析完全依赖本地的域名解析,无法使用服务端域名解析。 (将localDNS改成podDNS会报错ERR Exit: dns mode 'podDNS' is not available for connect mode 'tun2socks')

有解决方案不? 3:13PM INF Route to tun device completed 3:13PM INF Setting up dns in local mode 3:13PM INF Port forward local:57481 -> pod kt-connect-shadow-pehuf:53 established 3:13PM INF Setup local DNS with upstream [tcp:127.0.0.1:57481 udp:xxx.xxx.xxx.xxx:53]

image

xxx.xxx.xxx.xxx is the ali dns nameserver 169.254.20.10 in pod.

Danny5487401 commented 1 year ago

ktcl connect -n ticket-system -d --mode sshuttle --dnsMode podDNS 解决了private zone问题,是否tun2socks也支持?

Danny5487401 commented 1 year ago

https://github.com/alibaba/kt-connect/issues/329 增加 IncludeDomains 解决问题