Skip to content

Commit 8a359c8

Browse files
Updated the command putting in single line
Updated the command so that it stays in single line as per review comment
1 parent 63b59a3 commit 8a359c8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

content/en/docs/reference/kubectl/cheatsheet.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,8 @@ kubectl logs -f my-pod -c my-container # stream pod container logs
336336
kubectl logs -f -l name=myLabel --all-containers # stream all pods logs with label name=myLabel (stdout)
337337
kubectl run -i --tty busybox --image=busybox:1.28 -- sh # Run pod as interactive shell
338338
kubectl run nginx --image=nginx -n mynamespace # Start a single instance of nginx pod in the namespace of mynamespace
339-
kubectl run nginx --image=nginx # Generate spec for running pod nginx and write it into a file called pod.yaml
340-
--dry-run=client -o yaml > pod.yaml
341-
339+
kubectl run nginx --image=nginx --dry-run=client -o yaml > pod.yaml
340+
# Generate spec for running pod nginx and write it into a file called pod.yaml
342341
kubectl attach my-pod -i # Attach to Running Container
343342
kubectl port-forward my-pod 5000:6000 # Listen on port 5000 on the local machine and forward to port 6000 on my-pod
344343
kubectl exec my-pod -- ls / # Run command in existing pod (1 container case)

0 commit comments

Comments
 (0)