首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏k8s技术圈

    自己动手实现一个 kubectl exec

    Stdin: true, Stdout: true, Stderr: true, TTY: false, }, scheme.ParameterCodec) // remotecommand 主要实现了http 转 SPDY 添加X-Stream-Protocol-Version相关header 并发送请求 exec, err := remotecommand.NewSPDYExecutor (config, "POST", req.URL()) // 建立链接之后从请求的sream中发送、读取数据 if err = exec.Stream(remotecommand.StreamOptions "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/tools/clientcmd" "k8s.io/client-go/tools/remotecommand 主要实现了http 转 SPDY 添加X-Stream-Protocol-Version相关header 并发送请求 exec, err := remotecommand.NewSPDYExecutor

    3K20发布于 2021-05-17
  • 来自专栏有点技术

    基于gin+sockjs实现k8s pod web terminal

    = nil { return copy(p, reply), nil } else { self.SizeChan <- &remotecommand.TerminalSize err := self.Conn.Send(string(p)) return len(p), err}# resizefunc (self *TerminalSockjs) Next() *remotecommand.TerminalSize size.Height) return size}type TerminalSockjs struct { Conn sockjs.Session SizeChan chan *remotecommand.TerminalSize = nil { return err } return executor.Stream(remotecommand.StreamOptions{ ) t := &term.TerminalSockjs{ Conn: session, SizeChan: make(chan *remotecommand.TerminalSize

    1.9K20发布于 2020-07-14
  • 来自专栏程序员同行者

    k8s web终端连接工具

    服务端会基于k8s的remotecommand包,建立与container的ssh长连接,remotecommand包只需要我们提供3个回调,其中read是来获取terminal的输入,我们要做的就是读取

    3K20发布于 2019-07-28
  • 来自专栏运维之美

    如何以不同于认证用户的其它用户身份使用 VSCode 远程资源管理器

    : true, "remote.SSH.enableRemoteCommand": true, 然后,打开 SSH 配置文件(默认为 /home/$USER/.ssh/config),在主机中添加 RemoteCommand 例如: Host example.com HostName example.com IdentitiesOnly=yes User my_user RequestTTY yes RemoteCommand

    1.5K10编辑于 2024-07-30
  • 来自专栏charlieroro

    重定向Kubernetes pod中的tcpdump输出

    远程执行pod的tcpdump命令,并将输出重定向到文件或wireshark 上传tcpdump可执行文件 ksniff使用tar命令对tcpdump可执行文件进行打包,然后通过client-go的remotecommand = nil { return nil, err } return buf.Bytes(), nil } 远程执行命令 下面是远程在pod中执行命令的代码,是client-go remotecommand = nil, TTY: false, }, scheme.ParameterCodec) exec, err := remotecommand.NewSPDYExecutor(req.RestConfig = nil { return 0, err } err = exec.Stream(remotecommand.StreamOptions{ Stdin: req.StdIn, Stdout

    1.7K30编辑于 2023-02-25
  • 来自专栏用户6296428的专栏

    有赞持续集成容器化实践

    服务端会基于 k8s 的 remotecommand 包,建立与 container 的ssh长连接。 在查阅资料的过程中发现 k8s 的 remotecommand 实际上是提供了该功能的(详情可见remotecommand.go)。

    1.6K10发布于 2020-08-25
  • 来自专栏AI SPPECH

    135_ 移动应用安全防护体系构建:从代码审计到运行时保护的全方位安全策略

    fetchRemoteCommands(new CommandCallback() { @Override public void onCommandsReceived(List<RemoteCommand > commands) { for (RemoteCommand command : commands) { executeRemoteCommand } } }); } private void executeRemoteCommand(Context context, RemoteCommand

    22810编辑于 2025-11-16
  • 来自专栏python3

    Appium1.9 之 Chromedr

    site-packages\appium\webdriver\webdriver.py", line 136, in start_session 34 response = self.execute(RemoteCommand.NEW_SESSION

    61920发布于 2020-01-19
  • 来自专栏云原生实验室

    Kubectl exec 背后到底发生了什么?

    dockertypes.ContainerJSON, cmd []string, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize serveExec 处理器会调用 remoteCommand.ServeExec() 函数,这个函数又是干嘛的呢?

    3.2K30发布于 2020-05-26
  • 来自专栏frytea

    Putty个性化配置

    "=dword:00000000 "SshProt"=dword:00000003 "LogHost"="" "SSH2DES"=dword:00000000 "PublicKeyFile"="" "RemoteCommand

    3.5K30发布于 2020-08-24
  • 来自专栏运维开发故事

    Docker EOF问题排查

    dockertypes.ContainerJSON, cmd []string, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize

    5.5K10发布于 2021-06-24
  • 来自专栏MongoDB中文社区

    副本集是如何实现自动Failover的

    Error in heartbeat request to 172.30.129.78:30071; ExceededTimeLimit: Operation timed out, request was RemoteCommand

    90130发布于 2019-07-12
  • 来自专栏美码师

    MongoDB 节点宕机引发的思考

    Error in heartbeat request to 172.30.129.78:30071; ExceededTimeLimit: Operation timed out, request was RemoteCommand

    2.3K40发布于 2019-11-04
  • 来自专栏伪架构师

    (译)kubectl exec 的来龙去脉

    c *Container, cmd []string, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize

    3.4K71发布于 2019-08-29
  • 来自专栏腾讯云数据库(TencentDB)

    千亿级高并发MongoDB集群在某头部金融机构中的应用及性能优化实践(上)

    : 0 first: 1 firstCommandScheduler: RemoteCommandRetryScheduler request: RemoteCommand 3332431257 --

    1.3K51编辑于 2022-05-13
  • 来自专栏旅途散记

    听 GPT 讲 client-go 源代码 (4)

    File: client-go/tools/remotecommand/resize.go 在client-go项目中的resize.go文件是用来处理远程终端大小调整的功能。

    36110编辑于 2024-05-29
领券