$ ktctl exchange kk-feiyan --expose 80882:13PM INF 'KT Connect' is runing, you can access local app from cluster and localhost
2:13PM INF Client address 192.168.7.121
2:13PM INF deploy shadow deployment kk-feiyan-kt-yssnq in namespace default
2:13PM INF pod label: kt=kk-feiyan-kt-yssnq
2:13PM INF pod: kk-feiyan-kt-yssnq-6464bbf74d-smvhc is running,but not ready
2:13PM INF pod: kk-feiyan-kt-yssnq-6464bbf74d-smvhc is running,but not ready
2:13PM INF Shadow pod: kk-feiyan-kt-yssnq-6464bbf74d-smvhc is ready.
2:13PM INF create exchange shadow kk-feiyan-kt-yssnq in namespace default
2:13PM INF scale deployment kk-feiyan to 02:13PM INF * kk-feiyan (0 replicas) success
2:13PM INF remote 172.22.1.166 forward to local 8088Forwarding from 127.0.0.1:2266 -> 22Forwarding from [::1]:2266 -> 222:13PM INF exchange port forward to local start at pid: 702692:13PM INF redirect request from pod 172.22.1.166 22 to 127.0.0.1:2266 starting
Handling connection for2266Warning: Permanently added '[127.0.0.1]:2266'(ECDSA) to the list of known hosts.
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)2:13PM INF ssh remote port-forward start at pid: 70270
$ ktctl run localservice --port 8088 --expose
2:33PM INF Client address 192.168.7.121
2:33PM INF deploy shadow deployment localservice in namespace default
2:33PM INF pod label: kt=localservice
2:33PM INF pod: localservice-77d565c488-64hpp is running,but not ready
2:33PM INF pod: localservice-77d565c488-64hpp is running,but not ready
2:33PM INF Shadow pod: localservice-77d565c488-64hpp is ready.
2:33PM INF create shadow pod localservice-77d565c488-64hpp ip 172.22.1.74
2:33PM INF expose deployment localservice to localservice:8088
2:33PM INF remote 172.22.1.74 forward to local 8088Forwarding from 127.0.0.1:2274 -> 22Forwarding from [::1]:2274 -> 222:33PM INF exchange port forward to local start at pid: 708992:33PM INF redirect request from pod 172.22.1.74 22 to 127.0.0.1:2274 starting
Handling connection for2274Warning: Permanently added '[127.0.0.1]:2274'(ECDSA) to the list of known hosts.
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)2:33PM INF ssh remote port-forward start at pid: 709032:33PM INF forward remote 172.22.1.74:8088 -> 127.0.0.1:8088
可以看到该服务已经被拉起了
1
2
3
$ kubectl get deploy localservice
NAME READY UP-TO-DATE AVAILABLE AGE
localservice 1/1 11 86s