Rocs Du

Results 7 comments of Rocs Du

i have the same error too,

可以先解析pod的container列表 ,然后获取第一个container name 就可以了

上面不是有containername参数 ,https://github.com/du2016/web-terminal-in-go/blob/b7b451ac4ecd17294b8f0b9f8650a3a2b7f7e293/k8s-webshell/controllers/terminalws.go#L92 现在是传参,只需要把这里的容器名称改为pod中第一个容器的名称

![image](https://user-images.githubusercontent.com/12290300/61994789-cad27180-b0b1-11e9-9586-781ff2d35a15.png) 现在通过url获取四个参数,container名称改为后端获取

用低版本的 k8s.io/api,集群版本高的话最好升级下依赖