gravitational / teleport

The easiest, and most secure way to access and protect all of your infrastructure.
https://goteleport.com
GNU Affero General Public License v3.0
17.48k stars 1.75k forks source link

master: `kubectl run -i --tty ... -- bash` through teleport proxy hangs forever #2039

Closed mumoshu closed 6 years ago

mumoshu commented 6 years ago

What happened:

kubectl run -i --tty ... -- bash through the proxy does create a pod, but it never shows the bash promt.

$ kubectl run xenial-$(date +%s) --image ubuntu:xenial --rm -i --tty --restart=Never --insecure-skip-tls-verify -- bash

*hangs*

What you expected to happen:

I expect it to just show the prompt in a few seconds, like when I run kubectl directly against the k8s api on minikube:

$ kubectx minikube; kubectl run xenial-$(date +%s) --image ubuntu:xenial --rm -i --tty --restart=Never --insecure-skip-tls-verify -- bash
Switched to context "minikube".
If you don't see a command prompt, try pressing enter.
root@xenial-1529719367:/#

How to reproduce it (as minimally and precisely as possible):

Use the helm chart proposed in #2014 and run the command above.

Environment:

Browser environment

Relevant Debug Logs If Applicable

mumoshu commented 6 years ago

Note that kubectl run leaves a running pod. So, it may be issue that I can't attach to the running pod created via kubectl run automatically?

Also, kubectl attach and kubectl exec both worked for me. The session records are created after the interactive sessions are completed. So, the issue seems to present only in kubectl runs.

kontsevoy commented 6 years ago

@mumoshu thanks for reporting, but this is a kind of integration issue that would normally fall into our enterprise support category. The OSS repo is for reporting reproducible bugs. If you're interested in working with our integration engineers, please reach out to sales@gravitational.com

mumoshu commented 6 years ago

@kontsevoy Hi! Happy to work with them. But are you saying you can't reproduce this for the OSS ver. of Teleport? I thought that it would be reproducible given the code for the Kubernetes integration is open :)

kontsevoy commented 6 years ago

@mumoshu I see what's happening here... looks like you're playing with features in development. We don't have anything else at this moment (other than Github) to collaborate on the ongoing work, so I'll keep this open for you to chat with devs like @klizhentas who's looking into k8s integration.