Hi everyone!
I have the following problem:
-
I have Rancher and use it to get the Kubernetes configuration (as a file);
-
The next step is this Kubernetes config file, I put it in the standard path in ~/.kube/… and then use it when connecting to LENS (or connecting via kubectl);
-
Then I go to LENS, specify the path for the Kubernetes Clusters configuration files and select the config file I need to work, after which, when I go into it, I can do any manipulations except entering the container, I get the following error:
> exec kubectl exec -i -t -n testdomain-com testdomain-com-7dff6f4859-smd9j -c wordpress -- sh -c "clear; (bash || ash || sh)"
error: unable to upgrade connection: error dialing backend: remote error: tls: handshake failure
- At the same time, if I execute a command from the terminal, I can log into the container, I can’t log in only through LENS, an example of a login command through the terminal:
> kubectl --kubeconfig /home/user/.kube/test-k8s-cluster.yaml exec -i -t -n testdomain-com testdomain-com-7dff6f4859-smd9j -c wordpress --sh -c "clear; (bash |
|ash||sh)"
bash-5.1#
bash-5.1# ls -lah
total 280K
drwxr-xr-x 7 www-data www-data 4.0K Aug 16 16:44 .
drwxr-xr-x 1 root root 4.0K Jun 23 2023 ..
drwxrwxrwx 6 www-data www-data 4.0K Jul 16 16:27 .git
-rw-rw-rw- 1 www-data www-data 647 Jan 26 2024 .gitignore
...
It turns out that through LENS, I can’t access the container, but through the terminal and kubectl, I can log in without problems.
How can I fix the problem with logging into the container via LENS?
If any other details are needed, I will definitely share.
I hope you can help me.