From 1263a306447645ec2a9eb44b9db383b3dd5a8591 Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Mon, 13 Jul 2015 17:11:22 -0700 Subject: [PATCH] fix broken example links --- examples/guestbook-go/README.md | 50 ++++++++++++++++++++++----------- examples/simple-nginx.md | 20 +++++++++++-- examples/spark/README.md | 21 ++++++++++++-- 3 files changed, 70 insertions(+), 21 deletions(-) diff --git a/examples/guestbook-go/README.md b/examples/guestbook-go/README.md index 6ee6ce15f6d..4e5e6fd3c3d 100644 --- a/examples/guestbook-go/README.md +++ b/examples/guestbook-go/README.md @@ -1,3 +1,17 @@ + + + + +

*** PLEASE NOTE: This document applies to the HEAD of the source +tree only. If you are using a released version of Kubernetes, you almost +certainly want the docs that go with that version.

+ +Documentation for specific releases can be found at +[releases.k8s.io](http://releases.k8s.io). + + + + ## Guestbook Example This example shows how to build a simple multi-tier web application using Kubernetes and Docker. The application consists of a web front-end, Redis master for storage, and replicated set of Redis slaves, all for which we will create Kubernetes replication controllers, pods, and services. @@ -5,27 +19,27 @@ This example shows how to build a simple multi-tier web application using Kubern If you are running a cluster in Google Container Engine (GKE), instead see the [Guestbook Example for Google Container Engine](https://cloud.google.com/container-engine/docs/tutorials/guestbook). ##### Table of Contents - * [Step Zero: Prerequisites](<#step-zero) - * [Step One: Create the Redis master pod](<#step-one) - * [Step Two: Create the Redis master service](<#step-two) - * [Step Three: Create the Redis slave pods](<#step-three) - * [Step Four: Create the Redis slave service](<#step-four) - * [Step Five: Create the guestbook pods](<#step-five) - * [Step Six: Create the guestbook service](<#step-six) - * [Step Seven: View the guestbook](<#step-seven) + * [Step Zero: Prerequisites](#step-zero) + * [Step One: Create the Redis master pod](#step-one) + * [Step Two: Create the Redis master service](#step-two) + * [Step Three: Create the Redis slave pods](#step-three) + * [Step Four: Create the Redis slave service](#step-four) + * [Step Five: Create the guestbook pods](#step-five) + * [Step Six: Create the guestbook service](#step-six) + * [Step Seven: View the guestbook](#step-seven) * [Step Eight: Cleanup](#step-eight) ### Step Zero: Prerequisites -This example assumes that you have a working cluster. See the [Getting Started Guides](../../docs/getting-started-guides) for details about creating a cluster. +This example assumes that you have a working cluster. See the [Getting Started Guides](../../docs/getting-started-guides/) for details about creating a cluster. -**Tip:** View all the `kubectl` commands, including their options and descriptions in the [kudectl CLI reference](../../docs/kubectl.md). +**Tip:** View all the `kubectl` commands, including their options and descriptions in the [kudectl CLI reference](../../docs/user-guide/kubectl/kubectl.md). ### Step One: Create the Redis master pod Use the `examples/guestbook-go/redis-master-controller.json` file to create a [replication controller](../../docs/replication-controller.md) and Redis master [pod](../../docs/pods.md). The pod runs a Redis key-value server in a container. Using a replication controller is the preferred way to launch long-running pods, even for 1 replica, so that the pod benefits from the self-healing mechanism in Kubernetes (keeps the pods alive). -1. Use the [examples/guestbook-go/redis-master-controller.json](redis-master-controller.json) file to create the Redis master replication controller in your Kubernetes cluster by running the `kubectl create -f` *`filename`* command: +1. Use the [redis-master-controller.json](redis-master-controller.json) file to create the Redis master replication controller in your Kubernetes cluster by running the `kubectl create -f` *`filename`* command: ```shell $ kubectl create -f examples/guestbook-go/redis-master-controller.json replicationcontrollers/redis-master @@ -64,7 +78,7 @@ A Kubernetes '[service](../../docs/services.md)' is a named load balancer that p Services find the containers to load balance based on pod labels. The pod that you created in Step One has the label `app=redis` and `role=master`. The selector field of the service determines which pods will receive the traffic sent to the service. -1. Use the [examples/guestbook-go/redis-master-service.json](redis-master-service.json) file to create the service in your Kubernetes cluster by running the `kubectl create -f` *`filename`* command: +1. Use the [redis-master-service.json](redis-master-service.json) file to create the service in your Kubernetes cluster by running the `kubectl create -f` *`filename`* command: ```shell $ kubectl create -f examples/guestbook-go/redis-master-service.json services/redis-master @@ -83,7 +97,7 @@ Services find the containers to load balance based on pod labels. The pod that y ### Step Three: Create the Redis slave pods The Redis master we created earlier is a single pod (REPLICAS = 1), while the Redis read slaves we are creating here are 'replicated' pods. In Kubernetes, a replication controller is responsible for managing the multiple instances of a replicated pod. -1. Use the file [examples/guestbook-go/redis-slave-controller.json](redis-slave-controller.json) to create the replication controller by running the `kubectl create -f` *`filename`* command: +1. Use the file [redis-slave-controller.json](redis-slave-controller.json) to create the replication controller by running the `kubectl create -f` *`filename`* command: ```shell $ kubectl create -f examples/guestbook-go/redis-slave-controller.json replicationcontrollers/redis-slave @@ -120,7 +134,7 @@ The Redis master we created earlier is a single pod (REPLICAS = 1), while the Re Just like the master, we want to have a service to proxy connections to the read slaves. In this case, in addition to discovery, the Redis slave service provides transparent load balancing to clients. -1. Use the [examples/guestbook-go/redis-slave-service.json](redis-slave-service.json) file to create the Redis slave service by running the `kubectl create -f` *`filename`* command: +1. Use the [redis-slave-service.json](redis-slave-service.json) file to create the Redis slave service by running the `kubectl create -f` *`filename`* command: ```shell $ kubectl create -f examples/guestbook-go/redis-slave-service.json services/redis-slave @@ -142,7 +156,7 @@ Tip: It is helpful to set labels on your services themselves--as we've done here This is a simple Go `net/http` ([negroni](https://github.com/codegangsta/negroni) based) server that is configured to talk to either the slave or master services depending on whether the request is a read or a write. The pods we are creating expose a simple JSON interface and serves a jQuery-Ajax based UI. Like the Redis read slaves, these pods are also managed by a replication controller. -1. Use the [examples/guestbook-go/guestbook-controller.json](guestbook-controller.json) file to create the guestbook replication controller by running the `kubectl create -f` *`filename`* command: +1. Use the [guestbook-controller.json](guestbook-controller.json) file to create the guestbook replication controller by running the `kubectl create -f` *`filename`* command: ```shell $ kubectl create -f examples/guestbook-go/guestbook-controller.json replicationcontrollers/guestbook @@ -176,7 +190,7 @@ This is a simple Go `net/http` ([negroni](https://github.com/codegangsta/negroni Just like the others, we create a service to group the guestbook pods but this time, to make the guestbook front-end externally visible, we specify `"type": "LoadBalancer"`. -1. Use the [examples/guestbook-go/guestbook-service.json](guestbook-service.json) file to create the guestbook service by running the `kubectl create -f` *`filename`* command: +1. Use the [guestbook-service.json](guestbook-service.json) file to create the guestbook service by running the `kubectl create -f` *`filename`* command: ```shell $ kubectl create -f examples/guestbook-go/guestbook-service.json An external load-balanced service was created. On many platforms (e.g. Google Compute Engine), @@ -243,7 +257,9 @@ redis-slave ``` Tip: To turn down your Kubernetes cluster, follow the corresponding instructions in the version of the -[Getting Started Guides](../../docs/getting-started-guides) that you previously used to create your cluster. +[Getting Started Guides](../../docs/getting-started-guides/) that you previously used to create your cluster. + [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/examples/guestbook-go/README.md?pixel)]() + diff --git a/examples/simple-nginx.md b/examples/simple-nginx.md index 225ab3ad885..10f25661605 100644 --- a/examples/simple-nginx.md +++ b/examples/simple-nginx.md @@ -1,3 +1,17 @@ + + + + +

*** PLEASE NOTE: This document applies to the HEAD of the source +tree only. If you are using a released version of Kubernetes, you almost +certainly want the docs that go with that version.

+ +Documentation for specific releases can be found at +[releases.k8s.io](http://releases.k8s.io). + + + + ## Running your first containers in Kubernetes Ok, you've run one of the [getting started guides](../docs/getting-started-guides/) and you have @@ -8,7 +22,7 @@ to Kubernetes and running your first containers on the cluster. From this point onwards, it is assumed that `kubectl` is on your path from one of the getting started guides. -The [`kubectl run`](/docs/kubectl_run.md) line below will create two [nginx](https://registry.hub.docker.com/_/nginx/) [pods](/docs/pods.md) listening on port 80. It will also create a [replication controller](/docs/replication-controller.md) named `my-nginx` to ensure that there are always two pods running. +The [`kubectl run`](../../docs/user-guide/kubectl/kubectl_run.md) line below will create two [nginx](https://registry.hub.docker.com/_/nginx/) [pods](../docs/pods.md) listening on port 80. It will also create a [replication controller](../docs/replication-controller.md) named `my-nginx` to ensure that there are always two pods running. ```bash kubectl run my-nginx --image=nginx --replicas=2 --port=80 @@ -30,7 +44,7 @@ kubectl stop rc my-nginx ``` ### Exposing your pods to the internet. -On some platforms (for example Google Compute Engine) the kubectl command can integrate with your cloud provider to add a [public IP address](/docs/services.md#external-services) for the pods, +On some platforms (for example Google Compute Engine) the kubectl command can integrate with your cloud provider to add a [public IP address](../docs/services.md#external-services) for the pods, to do this run: ```bash @@ -50,4 +64,6 @@ Most people will eventually want to use declarative configuration files for crea is given in a different document. + [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/examples/simple-nginx.md?pixel)]() + diff --git a/examples/spark/README.md b/examples/spark/README.md index 0db489959c6..f257876051c 100644 --- a/examples/spark/README.md +++ b/examples/spark/README.md @@ -1,3 +1,17 @@ + + + + +

*** PLEASE NOTE: This document applies to the HEAD of the source +tree only. If you are using a released version of Kubernetes, you almost +certainly want the docs that go with that version.

+ +Documentation for specific releases can be found at +[releases.k8s.io](http://releases.k8s.io). + + + + # Spark example Following this example, you will create a functional [Apache @@ -19,7 +33,7 @@ The Docker images are heavily based on https://github.com/mattf/docker-spark This example assumes you have a Kubernetes cluster installed and running, and that you have installed the ```kubectl``` command line tool somewhere in your path. Please see the [getting -started](../../docs/getting-started-guides) for installation +started](../../docs/getting-started-guides/) for installation instructions for your platform. ## Step One: Start your Master service @@ -34,7 +48,7 @@ the Master service. $ kubectl create -f examples/spark/spark-master.json ``` -Then, use the [`examples/spark/spark-master-service.json`](spar-master-service.json) file to +Then, use the [`examples/spark/spark-master-service.json`](spark-master-service.json) file to create a logical service endpoint that Spark workers can use to access the Master pod. @@ -181,4 +195,7 @@ Make sure the Master Pod is running (use: ```kubectl get pods```). ```kubectl create -f spark-worker-controller.json``` + + [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/examples/spark/README.md?pixel)]() +