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

无法连接到K8s #384

Open 15216422268 opened 1 year ago

15216422268 commented 1 year ago

Describe the bug Exit: all routes failed to setup

Log 8:47PM DBG Background task log to /tmp/kt-1146519388 8:47PM INF Using cluster context k8s_qa (k8s_qa) 8:47PM INF KtConnect 0.3.6 start at 33114 (darwin amd64) 8:47PM DBG Rectify pod kt-rectifier-wsyfz created 8:47PM INF Fetching cluster time ... 8:47PM DBG Execute command [date +%s] in kt-rectifier-wsyfz:standalone 8:47PM DBG No time difference 8:47PM INF Using tun2socks mode 8:47PM DBG Private Key generated 8:47PM DBG Public key generated 8:47PM INF Successful create config map kt-connect-shadow-lixhn 8:47PM INF Deploying shadow pod kt-connect-shadow-lixhn in namespace sit 8:47PM INF Waiting for pod kt-connect-shadow-lixhn ... 8:47PM DBG Find 3 kt pods 8:47PM DBG * pod kt-rectifier-shhkm expired, lastHeartBeat: 1667898092 8:47PM DBG role , config: map[] 8:47PM INF Pod kt-connect-shadow-lixhn is ready 8:47PM DBG Using port 38016 8:47PM DBG Request port forward pod:22 -> local:38016 via https://192.168.30.81:6443 8:47PM INF Port forward local:38016 -> pod kt-connect-shadow-lixhn:22 established 8:47PM INF Socks proxy established 8:47PM INF Tun device utun1 is ready 8:47PM DBG Service CIDR are: [172.254.0.0/16] 8:47PM DBG Pod CIDR are: [172.10.0.0/16 192.168.30.0/24] 8:47PM DBG Using cluster IP 192.168.30.81 8:47PM DBG Cluster CIDR are: [172.254.0.0/16 172.10.0.0/16 192.168.30.0/24] 8:47PM INF Adding route to 172.254.0.0/16 8:47PM DBG Task /usr/local/bin/ifconfig with args [ifconfig utun1 inet 172.254.0.0/16 172.254.0.0] 8:47PM WRN Failed to add ip addr 172.254.0.0 to tun device 8:47PM INF Adding route to 172.10.0.0/16 8:47PM DBG Task /usr/local/bin/ifconfig with args [ifconfig utun1 add 172.10.0.0/16 172.10.0.0] 8:47PM WRN Failed to add ip addr 172.10.0.0 to tun device 8:47PM INF Adding route to 192.168.30.0/24 8:47PM DBG Task /usr/local/bin/ifconfig with args [ifconfig utun1 add 192.168.30.0/24 192.168.30.0] 8:47PM WRN Failed to add ip addr 192.168.30.0 to tun device 8:47PM WRN all routes failed to setup 8:47PM ERR Exit: all routes failed to setup 8:47PM DBG Cleaning workspace 8:47PM INF Removed pid file /Users/qeek/.kt/pid/connect-33114.pid 8:47PM INF Removed key file /Users/qeek/.kt/key/kt-connect-shadow-lixhn.key 8:47PM DBG Dropping hosts records ... 8:47PM DBG Received event "/Users/qeek/.kt/pid/connect-33114.pid": REMOVE 8:47PM INF Pid file was removed 8:47PM INF Cleaning configmap kt-connect-shadow-lixhn 8:47PM INF Cleaning shadow pod kt-connect-shadow-lixhn

Environment (please complete the following information):

Additional context sudo ktctl connect --portForwardTimeout 100 --podCreationTimeout 600 -n sit -d