Improve console output in k8s201 walkthrough.

This commit is contained in:
Alex Robinson 2015-07-18 18:31:22 -07:00
parent d95ca69400
commit 9b474c1afe

View File

@ -86,13 +86,13 @@ spec:
Create the labeled pod ([pod-nginx-with-label.yaml](pod-nginx-with-label.yaml)):
```sh
```console
$ kubectl create -f docs/user-guide/walkthrough/pod-nginx-with-label.yaml
```
List all pods with the label `app=nginx`:
```sh
```console
$ kubectl get pods -l app=nginx
```
@ -139,19 +139,19 @@ spec:
Create an nginx replication controller ([replication-controller.yaml](replication-controller.yaml)):
```sh
```console
$ kubectl create -f docs/user-guide/walkthrough/replication-controller.yaml
```
List all replication controllers:
```sh
```console
$ kubectl get rc
```
Delete the replication controller by name:
```sh
```console
$ kubectl delete rc nginx-controller
```
@ -187,13 +187,13 @@ spec:
Create an nginx service ([service.yaml](service.yaml)):
```sh
```console
$ kubectl create -f docs/user-guide/walkthrough/service.yaml
```
List all services:
```sh
```console
$ kubectl get services
```
@ -201,7 +201,7 @@ On most providers, the service IPs are not externally accessible. The easiest wa
Provided the service IP is accessible, you should be able to access its http endpoint with curl on port 80:
```sh
```console
$ export SERVICE_IP=$(kubectl get service nginx-service -o=template -t={{.spec.clusterIP}})
$ export SERVICE_PORT=$(kubectl get service nginx-service -o=template '-t={{(index .spec.ports 0).port}}')
$ curl http://${SERVICE_IP}:${SERVICE_PORT}
@ -209,7 +209,7 @@ $ curl http://${SERVICE_IP}:${SERVICE_PORT}
To delete the service by name:
```sh
```console
$ kubectl delete service nginx-controller
```