mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #12 from proppy/master
guestbook: small fixes to guestbook instructions
This commit is contained in:
commit
9f25cd29c5
@ -5,7 +5,7 @@ This example shows how to build a simple multi-tier web application using Kubern
|
||||
The example combines a web frontend, a redis master for storage and a replicated set of redis slaves.
|
||||
|
||||
### Step Zero: Prerequisites
|
||||
This example assumes that you have forked the repository and turned up a Kubernetes cluster.
|
||||
This example assumes that you have forked the repository and [turned up a Kubernetes cluster](https://github.com/GoogleCloudPlatform/kubernetes-new#setup).
|
||||
|
||||
|
||||
### Step One: Turn up the redis master.
|
||||
@ -73,7 +73,7 @@ cluster/cloudcfg.sh -c redis-master-service.json create /services
|
||||
|
||||
Once created, the service proxy on each minion is configured to set up a proxy on the specified port (in this case port 10000).
|
||||
|
||||
### Step Three: Turn up the replicated slave service.
|
||||
### Step Three: Turn up the replicated slave tasks.
|
||||
Although the redis master is a single task, the redis read slaves are a 'replicated' task, in Kubernetes, a replication controller is responsible for managing multiple instances of a replicated task. Create a file named `redis-slave-controller.json` that contains:
|
||||
|
||||
```javascript
|
||||
@ -139,7 +139,7 @@ Now that you have created the service specification, create it in your cluster w
|
||||
cluster/cloudcfg.sh -c redis-slave-service.json create /services
|
||||
```
|
||||
|
||||
### Step Five: Create the frontend service.
|
||||
### Step Five: Create the frontend task.
|
||||
|
||||
This is a simple PHP server that is configured to talk to both the slave and master services depdending on if the request is a read or a write. It exposes a simple AJAX interface, and serves an angular based U/X. Like the redis read slaves it is a replicated service instantiated by a replication controller. Create a file named `frontend-controller.json`:
|
||||
|
||||
@ -219,4 +219,6 @@ if (isset($_GET['cmd']) === true) {
|
||||
} ?>
|
||||
```
|
||||
|
||||
To play with the service itself, find the name of a frontend, grab the external IP of that host from the Google Cloud Console, and visit http://<host-ip>:8080. Note, you may need to open the firewall for port 8080 using the console or the gcloud tool.
|
||||
To play with the service itself, find the name of a frontend, grab the external IP of that host from the [Google Cloud Console][cloud-console], and visit `http://<host-ip>:8080`. Note, you may need to open the firewall for port 8080 using the [console][cloud-console] or the `gcloud` tool.
|
||||
|
||||
[cloud-console]: https://console.developer.google.com
|
||||
|
Loading…
Reference in New Issue
Block a user