零号智能

  • Python
  • 部署
  • go
  • VPS
  • 运维
  • 生活琐事
  • html
零号智能
Fantasia's blog npc0.com.
  1. 首页
  2. go
  3. 正文

头大的kubernetes client-go exec

2021年6月21日 3561点热度 2人点赞 0条评论

今天是第6天被client-go的exec非严重错误如log.info级别,结果直接返回报错弄得头大。目前用的代码是

if exec, err = remotecommand.NewSPDYExecutor(e.LinkConfig, "POST",
e.Client.CoreV1().RESTClient().Post().
Resource("pods").
Name(runName).
Namespace(namespace).
SubResource("exec").
Param("container", podName).
VersionedParams(
&v1.PodExecOptions{
Command: cmd,
Stdin: false,
Stdout: true,
Stderr: true,
TTY: tty,
},
scheme.ParameterCodec,
).URL()); err == nil {
err = exec.Stream(remotecommand.StreamOptions{
Tty: true,
Stdin: nil,
Stdout: &stdout,
Stderr: &stderr,
})
}
本作品采用 知识共享署名 4.0 国际许可协议 进行许可
标签: 暂无
最后更新:2021年6月21日

vpc

这个人很懒,什么都没留下

点赞
< 上一篇

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

COPYRIGHT © 2021 npc0.com. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

粤ICP备19157245号-1

粤公网安备 44030702002746号