rptl
rptl

Reputation: 31

Kubernetes Rest API - Exec (re)size

How can I set Size (ie: cols and rows) using Rest API WebSockets Exec? API doc does not mention it.

kubectl exec -v=99 doesn't give me a clue how it's setting size.

I've read some people setting environment variables COLUMNS and ROWS when running kubectl exec -it $container env COLUMNS=$COLUMNS LINES=$LINES TERM=$TERM bash, but there is nothing documented for exec method api in order to set variables either.

Upvotes: 1

Views: 351

Answers (1)

rptl
rptl

Reputation: 31

Answering my own question: You have to send those envs mentioned in my question as multiple command's in your query.

ie: to Execute bash with 80 columns and 24 rows: &command=env&command=COLUMNS%3D80&command=ROWS%3D24&command=/bin/bash

Upvotes: 2

Related Questions