wscat established connection with k8s pod container, but command interaction with it fails

4/9/2020

I use wscat having successfully established connection with pod container(/bin/bash), but when I send command to it, I received no response from it. Could anyone tell me why? enter image description here

-- user3398604
command
interaction
kubernetes
pod

1 Answer

4/20/2020

Posting @user3398604 solution as community wiki for better visibility:

K8S api-server using websocket sub-protocol to exchange data. For input(stdin), the protocol requires the payload is heading with '\0' byte, not zero, it's ascii zero-valued character. So wscat is limited to interacting with k8s pod due to wscat can not send invisible character.

-- KFC_
Source: StackOverflow