https://github.com/kairen/pod-websocket-exec
Learning how to exec a pod via WebSocket written in Go.
https://github.com/kairen/pod-websocket-exec
kubernetes pod websocket
Last synced: 6 months ago
JSON representation
Learning how to exec a pod via WebSocket written in Go.
- Host: GitHub
- URL: https://github.com/kairen/pod-websocket-exec
- Owner: kairen
- Created: 2018-06-24T13:05:36.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-04-07T06:01:43.000Z (over 3 years ago)
- Last Synced: 2025-03-24T06:11:24.584Z (7 months ago)
- Topics: kubernetes, pod, websocket
- Language: Go
- Homepage:
- Size: 9.77 KB
- Stars: 26
- Watchers: 3
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Exec a Pod via WebSocket
Learning how to exec a pod via WebSocket written in Go.## Building
First clone the repo, and execute `Makefile` using make tool:
```sh
$ git clone https://github.com/kairen/pod-websocket-exec.git $GOPATH/src/github.com/kairen/pod-websocket-exec
$ cd $GOPATH/src/github.com/kairen/pod-websocket-exec
$ make
```## Running
To exec the command on pod as below:
```sh
$ kubectl run nginx --image nginx --restart=Never
$ ./k8s-ws-exec -p nginx -c nginx -t -i --command sh
# ls
bin dev home lib64 mnt proc run srv tmp var
boot etc lib media opt root sbin sys usr
```