Update cheatsheet.md
It's wrong to say "Run pod nginx" along with the spec being written to the file as the option --dry-run would make sure that the actual executing is not happening but only the preview is generated The statement would have been correct if the command were something like ... kubectl run nginx --image=nginx -o yaml > pod.yaml
This commit is contained in:
parent
4762c8d95c
commit
e343b36d72
|
|
@ -336,7 +336,7 @@ kubectl logs -f my-pod -c my-container # stream pod container logs
|
||||||
kubectl logs -f -l name=myLabel --all-containers # stream all pods logs with label name=myLabel (stdout)
|
kubectl logs -f -l name=myLabel --all-containers # stream all pods logs with label name=myLabel (stdout)
|
||||||
kubectl run -i --tty busybox --image=busybox:1.28 -- sh # Run pod as interactive shell
|
kubectl run -i --tty busybox --image=busybox:1.28 -- sh # Run pod as interactive shell
|
||||||
kubectl run nginx --image=nginx -n mynamespace # Start a single instance of nginx pod in the namespace of mynamespace
|
kubectl run nginx --image=nginx -n mynamespace # Start a single instance of nginx pod in the namespace of mynamespace
|
||||||
kubectl run nginx --image=nginx # Run pod nginx and write its spec into a file called pod.yaml
|
kubectl run nginx --image=nginx # Generate spec for running pod nginx and write it into a file called pod.yaml
|
||||||
--dry-run=client -o yaml > pod.yaml
|
--dry-run=client -o yaml > pod.yaml
|
||||||
|
|
||||||
kubectl attach my-pod -i # Attach to Running Container
|
kubectl attach my-pod -i # Attach to Running Container
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue