#k8s
kubectl exec -ti busybox env COLUMNS=$COLUMNS LINES=$LINES bash
#k8s example
kubectl exec -ti mytomcat-6f898c6f44-9m52h env COLUMNS=180 LINES=180 bash
#docker
docker exec -it -e LINES=$(tput lines) -e COLUMNS=$(tput cols) 镜像 bash