Update index.md
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
---
|
---
|
||||||
|
|
||||||
This example demonstrates running pods, replication controllers, and
|
This example demonstrates running pods, replication controllers, and
|
||||||
services. It shows two types of pods: frontend and backend, with
|
services. It shows two types of pods: frontend and backend, with
|
||||||
@@ -23,15 +23,15 @@ for your platform.
|
|||||||
## Optional: Build your own containers
|
## Optional: Build your own containers
|
||||||
|
|
||||||
The code for the containers is under
|
The code for the containers is under
|
||||||
[containers/](/docs/user-guide/environment-guide/containers/)
|
[containers/](/docs/user-guide/containers/)
|
||||||
|
|
||||||
## Get everything running
|
## Get everything running
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
kubectl create -f ./backend-rc.yaml
|
kubectl create -f ./backend-rc.yaml
|
||||||
kubectl create -f ./backend-srv.yaml
|
kubectl create -f ./backend-srv.yaml
|
||||||
kubectl create -f ./show-rc.yaml
|
kubectl create -f ./show-rc.yaml
|
||||||
kubectl create -f ./show-srv.yaml
|
kubectl create -f ./show-srv.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
## Query the service
|
## Query the service
|
||||||
@@ -46,7 +46,7 @@ your service.
|
|||||||
Run `curl <public ip>:80` to query the service. You should get
|
Run `curl <public ip>:80` to query the service. You should get
|
||||||
something like this back:
|
something like this back:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
Pod Name: show-rc-xxu6i
|
Pod Name: show-rc-xxu6i
|
||||||
Pod Namespace: default
|
Pod Namespace: default
|
||||||
USER_VAR: important information
|
USER_VAR: important information
|
||||||
@@ -66,8 +66,8 @@ Response from backend
|
|||||||
Backend Container
|
Backend Container
|
||||||
Backend Pod Name: backend-rc-6qiya
|
Backend Pod Name: backend-rc-6qiya
|
||||||
Backend Namespace: default
|
Backend Namespace: default
|
||||||
```
|
```
|
||||||
|
|
||||||
First the frontend pod's information is printed. The pod name and
|
First the frontend pod's information is printed. The pod name and
|
||||||
[namespace](https://github.com/kubernetes/kubernetes/blob/{{page.githubbranch}}/docs/design/namespaces.md) are retrieved from the
|
[namespace](https://github.com/kubernetes/kubernetes/blob/{{page.githubbranch}}/docs/design/namespaces.md) are retrieved from the
|
||||||
[Downward API](/docs/user-guide/downward-api). Next, `USER_VAR` is the name of
|
[Downward API](/docs/user-guide/downward-api). Next, `USER_VAR` is the name of
|
||||||
@@ -86,8 +86,8 @@ service. This results in a different backend pod servicing each
|
|||||||
request as well.
|
request as well.
|
||||||
|
|
||||||
## Cleanup
|
## Cleanup
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
kubectl delete rc,service -l type=show-type
|
kubectl delete rc,service -l type=show-type
|
||||||
kubectl delete rc,service -l type=backend-type
|
kubectl delete rc,service -l type=backend-type
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user