Update kubectl run from docs where necessary

kubectl run starting from 1.18 is creating only Pods and there is no option to
create any other resource. Users should be using kubectl create
commands instead. This update the documentation in all those places
where kubectl create should be used instead or changes description to
reflect the situation.
This commit is contained in:
Maciej Szulik
2020-06-25 13:37:11 +02:00
parent f9fb77b082
commit 00f502fa6a
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
```