Collected markedown fixes around syntax.
This commit is contained in:
@@ -41,7 +41,7 @@ The example combines a web frontend and an external service that provides MySQL
|
||||
|
||||
This example assumes that you have a basic understanding of kubernetes [services](../../docs/user-guide/services.md) and that you have forked the repository and [turned up a Kubernetes cluster](../../docs/getting-started-guides/):
|
||||
|
||||
```shell
|
||||
```sh
|
||||
$ cd kubernetes
|
||||
$ hack/dev-build-and-up.sh
|
||||
```
|
||||
@@ -56,7 +56,7 @@ In the remaining part of this example we will assume that your instance is named
|
||||
|
||||
To start Phabricator server use the file [`examples/phabricator/phabricator-controller.json`](phabricator-controller.json) which describes a [replication controller](../../docs/user-guide/replication-controller.md) with a single [pod](../../docs/user-guide/pods.md) running an Apache server with Phabricator PHP source:
|
||||
|
||||
```js
|
||||
```json
|
||||
{
|
||||
"kind": "ReplicationController",
|
||||
"apiVersion": "v1",
|
||||
@@ -98,13 +98,13 @@ To start Phabricator server use the file [`examples/phabricator/phabricator-cont
|
||||
|
||||
Create the phabricator pod in your Kubernetes cluster by running:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
$ kubectl create -f examples/phabricator/phabricator-controller.json
|
||||
```
|
||||
|
||||
Once that's up you can list the pods in the cluster, to verify that it is running:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
kubectl get pods
|
||||
```
|
||||
|
||||
@@ -117,7 +117,7 @@ phabricator-controller-9vy68 1/1 Running 0 1m
|
||||
|
||||
If you ssh to that machine, you can run `docker ps` to see the actual pod:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
me@workstation$ gcloud compute ssh --zone us-central1-b kubernetes-minion-2
|
||||
|
||||
$ sudo docker ps
|
||||
@@ -148,7 +148,7 @@ gcloud sql instances patch phabricator-db --authorized-networks 130.211.141.151
|
||||
|
||||
To automate this process and make sure that a proper host is authorized even if pod is rescheduled to a new machine we need a separate pod that periodically lists pods and authorizes hosts. Use the file [`examples/phabricator/authenticator-controller.json`](authenticator-controller.json):
|
||||
|
||||
```js
|
||||
```json
|
||||
{
|
||||
"kind": "ReplicationController",
|
||||
"apiVersion": "v1",
|
||||
@@ -184,7 +184,7 @@ To automate this process and make sure that a proper host is authorized even if
|
||||
|
||||
To create the pod run:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
$ kubectl create -f examples/phabricator/authenticator-controller.json
|
||||
```
|
||||
|
||||
@@ -195,7 +195,7 @@ A Kubernetes 'service' is a named load balancer that proxies traffic to one or m
|
||||
|
||||
The pod that you created in Step One has the label `name=phabricator`. The selector field of the service determines which pods will receive the traffic sent to the service. Since we are setting up a service for an external application we also need to request external static IP address (otherwise it will be assigned dynamically):
|
||||
|
||||
```shell
|
||||
```sh
|
||||
$ gcloud compute addresses create phabricator --region us-central1
|
||||
Created [https://www.googleapis.com/compute/v1/projects/myproject/regions/us-central1/addresses/phabricator].
|
||||
NAME REGION ADDRESS STATUS
|
||||
@@ -204,7 +204,7 @@ phabricator us-central1 107.178.210.6 RESERVED
|
||||
|
||||
Use the file [`examples/phabricator/phabricator-service.json`](phabricator-service.json):
|
||||
|
||||
```js
|
||||
```json
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
@@ -228,14 +228,14 @@ Use the file [`examples/phabricator/phabricator-service.json`](phabricator-servi
|
||||
|
||||
To create the service run:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
$ kubectl create -f examples/phabricator/phabricator-service.json
|
||||
phabricator
|
||||
```
|
||||
|
||||
To play with the service itself, find the external IP of the load balancer:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
$ kubectl get services phabricator -o template --template='{{(index .status.loadBalancer.ingress 0).ip}}{{"\n"}}'
|
||||
```
|
||||
|
||||
@@ -243,7 +243,7 @@ and then visit port 80 of that IP address.
|
||||
|
||||
**Note**: You may need to open the firewall for port 80 using the [console][cloud-console] or the `gcloud` tool. The following command will allow traffic from any source to instances tagged `kubernetes-minion`:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
$ gcloud compute firewall-rules create phabricator-node-80 --allow=tcp:80 --target-tags kubernetes-minion
|
||||
```
|
||||
|
||||
@@ -251,7 +251,7 @@ $ gcloud compute firewall-rules create phabricator-node-80 --allow=tcp:80 --targ
|
||||
|
||||
To turn down a Kubernetes cluster:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
$ cluster/kube-down.sh
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user