https://rancher.com/ logo
#k3s
Title
# k3s
m

melodic-hamburger-23329

10/28/2022, 3:39 AM
Any idea why
kubectl exec
hangs and timeouts when trying to connect k3s API server via Traefik TCP ingress route? Other commands, including
port-forward
work.
Copy code
> kubectl exec -i -t <...> -n <...> --v=9 -- /bin/sh
...
028 09:26:17.416564    9632 round_trippers.go:553] POST https://<...>:443/api/v1/namespaces/<...>/pods/<...>/exec?command=%2Fbin%2Fsh&container=<...>&stdin=true&stdout=true&tty=true 101 Switching Protocols in 104 milliseconds
                                                                                                  I1028 09:26:17.416585    9632 round_trippers.go:570] HTTP Statistics: DNSLookup 15 ms Dial 19 ms TLSHandshake 0 ms Duration 104 ms
                            I1028 09:26:17.416596    9632 round_trippers.go:577] Response Headers:
                                                                                                  I1028 09:26:17.416603    9632 round_trippers.go:580]     Connection: Upgrade
                                                                                                                                                                              I1028 09:26:17.416608    9632 round_trippers.go:580]     Upgrade: SPDY/3.1
                                                I1028 09:26:17.416613    9632 round_trippers.go:580]     X-Stream-Protocol-Version: <http://v4.channel.k8s.io|v4.channel.k8s.io>
                                                                                                                                                     error: Timeout occurred
c

creamy-pencil-82913

10/28/2022, 3:58 AM
Are you trying to connect to rancher through Traefik, or just the apiserver? I don't think those would be related if you're not talking to rancher.
m

melodic-hamburger-23329

10/28/2022, 3:58 AM
I mean I just want to get shell to a pod in k3s
210 Views