Add escape sequence for kubectl attach/run (#6740)
This commit is contained in:
parent
dfa9bf566c
commit
aad35d1d4e
|
|
@ -53,6 +53,8 @@ kubectl run [-i] [--tty] --attach <name> --image=<image>
|
|||
```
|
||||
|
||||
Unlike `docker run ...`, if `--attach` is specified, we attach to `stdin`, `stdout` and `stderr`, there is no ability to control which streams are attached (`docker -a ...`).
|
||||
To detach from the container, you can type the escape sequence which is Ctrl+P
|
||||
followed by Ctrl+Q.
|
||||
|
||||
Because we start a Deployment for your container, it will be restarted if you terminate the attached process (e.g. `ctrl-c`), this is different from `docker run -it`.
|
||||
To destroy the Deployment (and its pods) you need to run `kubectl delete deployment <name>`.
|
||||
|
|
@ -105,6 +107,9 @@ $ kubectl attach -it nginx-app-5jyvm
|
|||
...
|
||||
```
|
||||
|
||||
To detach from the container, you can type the escape sequence which is Ctrl+P
|
||||
followed by Ctrl+Q.
|
||||
|
||||
#### docker exec
|
||||
|
||||
How do I execute a command in a container? Checkout [kubectl exec](/docs/user-guide/kubectl/{{page.version}}/#exec).
|
||||
|
|
|
|||
Loading…
Reference in New Issue