Merge pull request #22054 from soltysh/kubectl_run_updates

Update kubectl run from docs where necessary
This commit is contained in:
Kubernetes Prow Robot
2020-06-26 14:30:14 -07:00
committed by GitHub
6 changed files with 13 additions and 22 deletions
@@ -73,9 +73,6 @@ kubectl run [-i] [--tty] --attach <name> --image=<image>
Unlike `docker run ...`, if you specify `--attach`, then you attach `stdin`, `stdout` and `stderr`. You cannot control which streams are attached (`docker -a ...`).
To detach from the container, you can type the escape sequence Ctrl+P followed by Ctrl+Q.
Because the kubectl run command starts a Deployment for the container, the Deployment restarts if you terminate the attached process by using Ctrl+C, unlike `docker run -it`.
To destroy the Deployment and its pods you need to run `kubectl delete deployment <name>`.
## docker ps
To list what is currently running, see [kubectl get](/docs/reference/generated/kubectl/kubectl-commands/#get).
@@ -188,7 +185,7 @@ docker exec -ti 55c103fa1296 /bin/sh
kubectl:
```shell
kubectl exec -ti nginx-app-5jyvm -- /bin/sh
kubectl exec -ti nginx-app-5jyvm -- /bin/sh
# exit
```