You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ Instead of `exec bash` into multiple pod's containers one-at-a-time, like `kubec
9
9
You can now use
10
10
11
11
```sh
12
-
kubectl tmuxexec -it -l app=nginx /bin/bash
12
+
kubectl tmux-exec -it -l app=nginx /bin/bash
13
13
```
14
14
15
15
# Installation via Homebrew
@@ -22,11 +22,11 @@ After that, execute the command below.
22
22
brew install predatorray/brew/kubectl-tmux-exec
23
23
```
24
24
25
-
The script should be installed under `/usr/local/bin/kubectl-tmux-exec` by default. Please ensure the `bin` directory is in your `$PATH` environment variable.
25
+
The script should be installed under `/usr/local/bin/kubectl-tmux_exec` by default. Please ensure the `bin` directory is in your `$PATH` environment variable.
26
26
27
27
# Usage
28
28
29
-
To execute this script as a [plugin]((https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/)), a `kubectl` version prior to `1.12.0` is required and the latest version is preferred. But you can execute the script directly like `kubectl-tmux-exec [...ARGS]` if it is not supported.
29
+
To execute this script as a [plugin]((https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/)), a `kubectl` version prior to `1.12.0` is required and the latest version is preferred. But you can execute the script directly like `kubectl-tmux_exec [...ARGS]` if it is not supported.
30
30
31
31
If it is supported, you can check if the script has been added to kubectl's plugin list by
32
32
@@ -39,31 +39,31 @@ The output should be like
39
39
```txt
40
40
The following compatible plugins are available:
41
41
42
-
/usr/local/bin/kubectl-tmux-exec
42
+
/usr/local/bin/kubectl-tmux_exec
43
43
```
44
44
45
45
If it does not show in the list, check `$PATH` env again.
46
46
47
47
You can use the command below to get the usage of the script.
48
48
49
49
```sh
50
-
kubectl tmuxexec --help
50
+
kubectl tmux-exec --help
51
51
```
52
52
53
53
Or, execute it directly.
54
54
55
55
```
56
-
kubectl-tmux-exec --help
56
+
kubectl-tmux_exec --help
57
57
```
58
58
59
59
## Example
60
60
61
-
The `tmuxexec` is similar to `exec`, except that it requires label selectors while `exec` requires a pod name.
61
+
The `tmux-exec` is similar to `exec`, except that it requires label selectors while `exec` requires a pod name.
62
62
63
63
To `bash` into all pod containers that share some common labels, `foo=bar` for instance.
64
64
65
65
```sh
66
-
kubectl tmuxexec -it -l foo=bar /bin/bash
66
+
kubectl tmux-exec -it -l foo=bar /bin/bash
67
67
```
68
68
69
69
It should be noted that the `-i` / `--stdin` and `-t` / `--tty` options must both be turned on when you are trying to initiate an interactive session. If not, there will not be any errors. Instead, the `tmux` process simply exits because the `exec`-ed command exits due to no inputs.
0 commit comments