Merge pull request #7942 from goltermann/master

Simple nginx Guide Fixes
This commit is contained in:
Brian Grant 2015-05-08 12:09:25 -07:00
commit 97004c87c1

View File

@ -6,12 +6,9 @@ to Kubernetes and running your first containers on the cluster.
### Running a container (simple version) ### Running a container (simple version)
Assume that ```${KUBERNETES_HOME}``` points to the directory where you installed the kubernetes directory. From this point onwards, it is assumed that ```kubectl``` is on your path from one of the getting started guides.
Once you have your cluster created you can use ```${KUBERNETES_HOME/kubernetes/cluster/kubectl.sh``` to access The `kubectl` line below spins up two containers running
the kubernetes api.
The `kubectl.sh` line below spins up two containers running
[Nginx](http://nginx.org/en/) running on port 80: [Nginx](http://nginx.org/en/) running on port 80:
```bash ```bash
@ -19,12 +16,16 @@ kubectl run-container my-nginx --image=nginx --replicas=2 --port=80
``` ```
Once the pods are created, you can list them to see what is up and running: Once the pods are created, you can list them to see what is up and running:
```base ```bash
kubectl get pods kubectl get pods
``` ```
To stop the two replicated containers: You can also see the replication controller that was created:
```bash
kubectl get rc
```
To stop the two replicated containers, stop the replication controller:
```bash ```bash
kubectl stop rc my-nginx kubectl stop rc my-nginx
``` ```
@ -34,7 +35,7 @@ On some platforms (for example Google Compute Engine) the kubectl command can in
to do this run: to do this run:
```bash ```bash
kubectl expose rc nginx --port=80 --create-external-load-balancer kubectl expose rc my-nginx --port=80 --create-external-load-balancer
``` ```
This should print the service that has been created, and map an external IP address to the service. This should print the service that has been created, and map an external IP address to the service.