From e1757289694ffe0e91b8bb0f77266b67351b76a6 Mon Sep 17 00:00:00 2001 From: goltermann Date: Thu, 7 May 2015 18:08:27 -0700 Subject: [PATCH] simple nginx fixes --- examples/simple-nginx.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/examples/simple-nginx.md b/examples/simple-nginx.md index e8d1dd97ca1..64c4ea2d24e 100644 --- a/examples/simple-nginx.md +++ b/examples/simple-nginx.md @@ -6,12 +6,9 @@ to Kubernetes and running your first containers on the cluster. ### 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 kubernetes api. - -The `kubectl.sh` line below spins up two containers running +The `kubectl` line below spins up two containers running [Nginx](http://nginx.org/en/) running on port 80: ```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: -```base +```bash 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 kubectl stop rc my-nginx ``` @@ -34,11 +35,11 @@ On some platforms (for example Google Compute Engine) the kubectl command can in to do this run: ```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. ### Next: Configuration files Most people will eventually want to use declarative configuration files for creating/modifying their applications. A [simplified introduction](simple-yaml.md) -is given in a different document. \ No newline at end of file +is given in a different document.