Kubernetes Exec with websockets

So i want to get shell access to my k8s pod from my frontend (using xterm.js) i see k8s node client has a exec method that i can use with streams, but that doesnt seem to work. Can anyone help ?
2 Replies
nc0
nc09mo ago
Given that pods are primitive units of jobs containing one or multiple pod (and are therefore independent from the node), you should look into getting a shell in the application container Like
Web App ---O <-- K8s API
|
+----[->(Container with shell access) ]
^ ^
| |
K8s pod -------------------------+
Web App ---O <-- K8s API
|
+----[->(Container with shell access) ]
^ ^
| |
K8s pod -------------------------+
@fero.xd
fero.xd
fero.xd9mo ago
I didnt understand it fully Are you saying to get shell access to the container running in the pod directly not via k8s api?
Want results from more Discord servers?
Add your server