Merge pull request #11519 from satnam6502/doc14

Fix doc formatting in connecting to app port forwarding
pull/6/head
Brian Grant 2015-07-18 16:43:14 -07:00
commit 3a6e60be40
1 changed files with 6 additions and 6 deletions

View File

@ -37,14 +37,14 @@ kubectl port-forward forwards connections to a local port to a port on a pod. It
## Creating a Redis master
```
$kubectl create examples/redis/redis-master.yaml
```console
$ kubectl create examples/redis/redis-master.yaml
pods/redis-master
```
wait until the Redis master pod is Running and Ready,
```
```console
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
redis-master 2/2 Running 0 41s
@ -55,7 +55,7 @@ redis-master 2/2 Running 0 41s
The Redis master is listening on port 6397, to verify this,
```
```console
$ kubectl get pods redis-master -t='{{(index (index .spec.containers 0).ports 0).containerPort}}{{"\n"}}'
6379
```
@ -63,7 +63,7 @@ $ kubectl get pods redis-master -t='{{(index (index .spec.containers 0).ports 0)
then we forward the port 6379 on the local workstation to the port 6379 of pod redis-master,
```
```console
$ kubectl port-forward -p redis-master 6379:6379
I0710 14:43:38.274550 3655 portforward.go:225] Forwarding from 127.0.0.1:6379 -> 6379
I0710 14:43:38.274797 3655 portforward.go:225] Forwarding from [::1]:6379 -> 6379
@ -71,7 +71,7 @@ I0710 14:43:38.274797 3655 portforward.go:225] Forwarding from [::1]:6379 ->
To verify the connection is successful, we run a redis-cli on the local workstation,
```
```console
$ redis-cli
127.0.0.1:6379> ping
PONG