Merge pull request #6741 from tengqm/fix-1785

Fix port-foward description in cheatsheet
This commit is contained in:
Joseph Heck 2018-01-07 14:12:36 -08:00 committed by GitHub
commit ec64856598
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -215,7 +215,7 @@ $ kubectl logs -f my-pod # stream pod logs (stdout)
$ kubectl logs -f my-pod -c my-container # stream pod container logs (stdout, multi-container case)
$ 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 # Listen on port 5000 on the local machine and forward to port 6000 on my-pod
$ 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)
$ kubectl top pod POD_NAME --containers # Show metrics for a given pod and its containers