5

I have a private kubernetes cluster with private ip. In order to access it i have set up a bastion host with squid proxy. It looks like this:

My host -> bastion -> private cloud

Regular kubectl commands work throw proxy as expected:

$ HTTPS_PROXY=socks5://127.0.0.1:1080 kubectl get pods 
No resources found.

The problem is when trying to ssh to a pod:

$ HTTPS_PROXY=socks5://127.0.0.1:1080 kubectl exec -it "some-pod" -- /bin/bash
error: error sending request: Post https://<master-ip>/api/v1/namespaces/ns/pods/some-pod/exec?command=%2Fbin%2Fbash&container=xxx&container=xxx&stdin=true&stdout=true&tty=true: EOF

What am i doing wrong?

Erez Ben Harush
  • 177
  • 1
  • 7
  • Topic related with this other post https://stackoverflow.com/questions/54548736/ssh-to-kubenetes-pod-using-bastion – AlbertoVI Apr 02 '19 at 08:21

1 Answers1

2

As it is said in this other Stackdriver post, the EXEC command use SPDY2 so it cannot be implemented.

More details in this GitHub post

AlbertoVI
  • 56
  • 4