From 7fc8f1a220d9f7ffdc76932b198604b18d8bf10a Mon Sep 17 00:00:00 2001 From: Christopher Montoro Date: Wed, 7 Oct 2020 22:02:37 -0400 Subject: [PATCH] Update the example for kubectl port-forward Clarify that `REMOTE_PORT` is interpreted as identifying a _Service_ port when provided `TYPE` is `service`. Also, highlight support for specifying a named port as `REMOTE_PORT`. --- .../port-forward-access-application-cluster.md | 2 +- .../examples/application/guestbook/redis-master-service.yaml | 3 ++- 2 files changed, 3 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 a6c2e217a5..3eceb4f6d2 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 @@ -152,7 +152,7 @@ for database debugging. or ```shell - kubectl port-forward service/redis-master 7000:6379 + kubectl port-forward service/redis-master 7000:redis ``` Any of the above commands works. The output is similar to this: diff --git a/content/en/examples/application/guestbook/redis-master-service.yaml b/content/en/examples/application/guestbook/redis-master-service.yaml index a484014f1f..65cef2191c 100644 --- a/content/en/examples/application/guestbook/redis-master-service.yaml +++ b/content/en/examples/application/guestbook/redis-master-service.yaml @@ -8,7 +8,8 @@ metadata: tier: backend spec: ports: - - port: 6379 + - name: redis + port: 6379 targetPort: 6379 selector: app: redis