Unable to SSH from inside Kubernetes container

8/9/2018

I have a container running inside Kubernetes that I created using Helm and a Dockerfile. I am trying to run an application that connects to another machine outside of my cluster over SSH, but the connection always times out.

I am able to open a shell connection to it with kubectl exec -it my-container --namespace my-namespace -- /bin/bash from which I can use http without any trouble, but ping and ssh both hang and timeout.

What do I need in order to enable outbound SSH connections from my container?

-- Trevin Avery
docker
kubernetes
kubernetes-helm

0 Answers