diff --git a/docs/reference/kubectl/docker-cli-to-kubectl.md b/docs/reference/kubectl/docker-cli-to-kubectl.md index cb521f620c..ce91046c2d 100644 --- a/docs/reference/kubectl/docker-cli-to-kubectl.md +++ b/docs/reference/kubectl/docker-cli-to-kubectl.md @@ -53,6 +53,8 @@ kubectl run [-i] [--tty] --attach --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 `. @@ -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).