lensapp / lens

Lens - The way the world runs Kubernetes
https://k8slens.dev/
MIT License
22.31k stars 1.45k forks source link

tls: handshake failure #5040

Open sarce666 opened 2 years ago

sarce666 commented 2 years ago

hello

after a change of my kube config i get this error in lens when i try to connect wityh a shell in a pod error: unable to upgrade connection: error dialing backend: remote error: tls: handshake failure

with that command : exec kubectl exec -i -t -n neo4j cpi-0 -c neo4j -- sh -c "clear; (bash || ash || sh)"

if i execute it on a terminal on my device it work perfectly

is there a temp folder when i can remove the certificate in my kube config i did change the name of the cluster , in lens i can connect but not with shell ssh on pods thanks

Nokel81 commented 2 years ago

Did you change the config while Lens was running?

What sort of change did you make?

sarce666 commented 2 years ago

hello yes i change the config , i change the kube config file ( i change the host name ) when i start lens since then i can connect to the cluster but i have this error with connecting on the shell , it looks llike lens kept certificate in temp ? because the command lens is supposed to launched exec kubectl exec -i -t -n neo4j cpi-0 -c neo4j -- sh -c "clear; (bash || ash || sh)" if i do it oin a terminal it works perfectly i tried to deinstall et resintall it but same issue

sarce666 commented 2 years ago

on lens :

Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
sdfsdf@M1p004cpi ~> exec /usr/local/bin/kubectl exec -i -t -n neo4j cpi-0 -c neo4j -- sh -c "clear; (bash || ash || sh)"
error: unable to upgrade connection: error dialing backend: remote error: tls: handshake failure
Terminal will auto-close in 15 seconds ...
tungtt1006 commented 1 year ago

same here

andrei-bamboi commented 1 year ago

same here

GenLN commented 11 months ago

same here

hahn-kev commented 9 months ago

@Nokel81 I'm getting this error. From the logs I found these 2 errors that seem like they may be related:

error: W1011 16:40:40.826174   46156 dial.go:72] using custom dialer with no TLSClientConfig. Defaulting to InsecureSkipVerify
error: E1011 16:40:43.915653   46156 proxy_server.go:147] Error while proxying request: error dialing backend: remote error: tls: handshake failure

what can we do to fix this? I tried clearing out some caches but couldn't figure out a work around. As others have said I can connect directly just fine, it looks like it's the proxy that's the issue. Is there a way I can disable it when I try to run a shell?