From e651788efd11c9cc708ea6809f7b7367dabef15c Mon Sep 17 00:00:00 2001 From: Charle Demers Date: Thu, 3 Dec 2020 14:30:43 -0500 Subject: [PATCH 1/3] Update port-forward-access-application-cluster.md Add documentation about the simplified port mapping notation --- ...port-forward-access-application-cluster.md | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/content/en/docs/tasks/access-application-cluster/port-forward-access-application-cluster.md b/content/en/docs/tasks/access-application-cluster/port-forward-access-application-cluster.md index 3eceb4f6d2..53dd3f3ce8 100644 --- a/content/en/docs/tasks/access-application-cluster/port-forward-access-application-cluster.md +++ b/content/en/docs/tasks/access-application-cluster/port-forward-access-application-cluster.md @@ -158,8 +158,8 @@ for database debugging. Any of the above commands works. The output is similar to this: ``` - I0710 14:43:38.274550 3655 portforward.go:225] Forwarding from 127.0.0.1:7000 -> 6379 - I0710 14:43:38.274797 3655 portforward.go:225] Forwarding from [::1]:7000 -> 6379 + Forwarding from 127.0.0.1:7000 -> 6379 + Forwarding from [::1]:7000 -> 6379 ``` 2. Start the Redis command line interface: @@ -180,7 +180,23 @@ for database debugging. PONG ``` +### Optionaly let _kubectl_ choose the local port +If you don't need a specific local port, you can let `kubectl` choose and allocate +the local port and thus relieve you from having to manage local port conflicts, with +the slightly simpler syntax: + +```shell +kubectl port-forward deployment/redis-master :6379 +``` + +An allocated local port in the upper range will be displayed as a result, the output +will be similar to this: + +``` +Forwarding from 127.0.0.1:62162 -> 6379 +Forwarding from [::1]:62162 -> 6379 +``` From 36ab3f3faecbc3f5431629df8a17392e5e67150f Mon Sep 17 00:00:00 2001 From: Charle Demers Date: Fri, 4 Dec 2020 10:33:56 -0500 Subject: [PATCH 2/3] Update content/en/docs/tasks/access-application-cluster/port-forward-access-application-cluster.md Co-authored-by: Tim Bannister --- .../port-forward-access-application-cluster.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/content/en/docs/tasks/access-application-cluster/port-forward-access-application-cluster.md b/content/en/docs/tasks/access-application-cluster/port-forward-access-application-cluster.md index 53dd3f3ce8..eb37432feb 100644 --- a/content/en/docs/tasks/access-application-cluster/port-forward-access-application-cluster.md +++ b/content/en/docs/tasks/access-application-cluster/port-forward-access-application-cluster.md @@ -180,7 +180,7 @@ for database debugging. PONG ``` -### Optionaly let _kubectl_ choose the local port +### Optionally let _kubectl_ choose the local port {#let-kubectl-choose-local-port} If you don't need a specific local port, you can let `kubectl` choose and allocate the local port and thus relieve you from having to manage local port conflicts, with @@ -219,4 +219,3 @@ The support for UDP protocol is tracked in ## {{% heading "whatsnext" %}} Learn more about [kubectl port-forward](/docs/reference/generated/kubectl/kubectl-commands/#port-forward). - From 590cac5fb53d10a3cf6e2e1e32f801a53db4b211 Mon Sep 17 00:00:00 2001 From: Charle Demers Date: Fri, 4 Dec 2020 10:35:39 -0500 Subject: [PATCH 3/3] Update content/en/docs/tasks/access-application-cluster/port-forward-access-application-cluster.md Co-authored-by: Tim Bannister --- .../port-forward-access-application-cluster.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/docs/tasks/access-application-cluster/port-forward-access-application-cluster.md b/content/en/docs/tasks/access-application-cluster/port-forward-access-application-cluster.md index eb37432feb..1a6cb26711 100644 --- a/content/en/docs/tasks/access-application-cluster/port-forward-access-application-cluster.md +++ b/content/en/docs/tasks/access-application-cluster/port-forward-access-application-cluster.md @@ -190,8 +190,8 @@ the slightly simpler syntax: kubectl port-forward deployment/redis-master :6379 ``` -An allocated local port in the upper range will be displayed as a result, the output -will be similar to this: +The `kubectl` tool finds a local port number that is not in use (avoiding low ports numbers, +because these might be used by other applications). The output is similar to: ``` Forwarding from 127.0.0.1:62162 -> 6379