File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
content/en/docs/reference/kubectl Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -336,9 +336,8 @@ kubectl logs -f my-pod -c my-container # stream pod container logs
336
336
kubectl logs -f -l name=myLabel --all-containers # stream all pods logs with label name=myLabel (stdout)
337
337
kubectl run -i --tty busybox --image=busybox:1.28 -- sh # Run pod as interactive shell
338
338
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
342
341
kubectl attach my-pod -i # Attach to Running Container
343
342
kubectl port-forward my-pod 5000:6000 # Listen on port 5000 on the local machine and forward to port 6000 on my-pod
344
343
kubectl exec my-pod -- ls / # Run command in existing pod (1 container case)
You can’t perform that action at this time.
0 commit comments