Update index.md
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
---
|
||||
---
|
||||
---
|
||||
---
|
||||
|
||||
This example demonstrates running pods, replication controllers, and
|
||||
services. It shows two types of pods: frontend and backend, with
|
||||
@@ -23,15 +23,15 @@ for your platform.
|
||||
## Optional: Build your own containers
|
||||
|
||||
The code for the containers is under
|
||||
[containers/](/docs/user-guide/environment-guide/containers/)
|
||||
[containers/](/docs/user-guide/containers/)
|
||||
|
||||
## Get everything running
|
||||
|
||||
```shell
|
||||
kubectl create -f ./backend-rc.yaml
|
||||
kubectl create -f ./backend-srv.yaml
|
||||
kubectl create -f ./show-rc.yaml
|
||||
kubectl create -f ./show-srv.yaml
|
||||
```shell
|
||||
kubectl create -f ./backend-rc.yaml
|
||||
kubectl create -f ./backend-srv.yaml
|
||||
kubectl create -f ./show-rc.yaml
|
||||
kubectl create -f ./show-srv.yaml
|
||||
```
|
||||
|
||||
## Query the service
|
||||
@@ -46,7 +46,7 @@ your service.
|
||||
Run `curl <public ip>:80` to query the service. You should get
|
||||
something like this back:
|
||||
|
||||
```shell
|
||||
```shell
|
||||
Pod Name: show-rc-xxu6i
|
||||
Pod Namespace: default
|
||||
USER_VAR: important information
|
||||
@@ -66,8 +66,8 @@ Response from backend
|
||||
Backend Container
|
||||
Backend Pod Name: backend-rc-6qiya
|
||||
Backend Namespace: default
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
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
|
||||
[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.
|
||||
|
||||
## Cleanup
|
||||
|
||||
|
||||
```shell
|
||||
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