From 354ba657039f2d6b423ee09bb3bd6c8293b55f4b Mon Sep 17 00:00:00 2001 From: euan-am Date: Thu, 19 Jan 2017 10:09:51 +0200 Subject: [PATCH] Port-forward to local port documentation fix The port-forward command was incorrect for the documentation description for forwarding a local port to a pod --- docs/user-guide/kubectl-cheatsheet.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user-guide/kubectl-cheatsheet.md b/docs/user-guide/kubectl-cheatsheet.md index c16e7c264d..c147304a7d 100644 --- a/docs/user-guide/kubectl-cheatsheet.md +++ b/docs/user-guide/kubectl-cheatsheet.md @@ -200,7 +200,7 @@ $ kubectl logs my-pod # dump pod logs (stdout) $ kubectl logs -f my-pod # stream pod logs (stdout) $ kubectl run -i --tty busybox --image=busybox -- sh # Run pod as interactive shell $ kubectl attach my-pod -i # Attach to Running Container -$ kubectl port-forward my-pod 5000 6000 # Forward port 6000 of Pod to your to 5000 on your local machine +$ kubectl port-forward my-pod 5000:6000 # Forward port 6000 of Pod to your to 5000 on your local machine $ kubectl port-forward my-svc 6000 # Forward port to service $ kubectl exec my-pod -- ls / # Run command in existing pod (1 container case) $ kubectl exec my-pod -c my-container -- ls / # Run command in existing pod (multi-container case)