导语: 以防万一后面需要用到 先记录一下。
参考地址
https://github.com/du2016/web-terminal-in-go/tree/master/k8s-webshell
git clone https://github.com/du2016/web-terminal-in-go.git
cd k8s-webshell
nohup go run main.go &
k8s-webshell
通过web界面连接k8s容器,需要修改beego config配置,指定kubeconfig位置,设置为空则为incluster连接方式,需要传递以下参数:
- context
- namespace
- podname
- containername
功能
-
web终端实现
-
多集群支持
-
根据浏览器窗口调整tty大小
登录
点击提交即可登录