text stringlengths 0 59.1k |
|---|
- persistentvolumes |
<|endoftext|> |
# source: k8s_examples/_archived/phabricator/phabricator-service.json type: json |
{ |
"kind": "Service", |
"apiVersion": "v1", |
"metadata": { |
"name": "phabricator" |
}, |
"spec": { |
"ports": [ |
{ |
"port": 80, |
"targetPort": "http-server" |
} |
], |
"selector": { |
"name": "phabricator" |
}, |
"type": "LoadBalancer" |
} |
} |
<|endoftext|> |
# source: k8s_examples/_archived/phabricator/phabricator-controller.json type: json |
{ |
"kind": "ReplicationController", |
"apiVersion": "v1", |
"metadata": { |
"name": "phabricator-controller", |
"labels": { |
"name": "phabricator" |
} |
}, |
"spec": { |
"replicas": 1, |
"selector": { |
"name": "phabricator" |
}, |
"template": { |
"metadata": { |
"labels": { |
"name": "phabricator" |
} |
}, |
"spec": { |
"containers": [ |
{ |
"name": "phabricator", |
"image": "fgrzadkowski/example-php-phabricator", |
"ports": [ |
{ |
"name": "http-server", |
"containerPort": 80 |
} |
], |
"env": [ |
{ |
"name": "MYSQL_SERVICE_IP", |
"value": "1.2.3.4" |
}, |
{ |
"name": "MYSQL_SERVICE_PORT", |
"value": "3306" |
}, |
{ |
"name": "MYSQL_PASSWORD", |
"value": "1234" |
} |
] |
} |
] |
} |
} |
} |
} |
<|endoftext|> |
# source: k8s_examples/_archived/phabricator/README.md type: docs |
## Phabricator example |
This example shows how to build a simple multi-tier web application using Kubernetes and Docker. |
The example combines a web frontend and an external service that provides MySQL database. We use CloudSQL on Google Cloud Platform in this example, but in principle any approach to running MySQL should work. |
### Step Zero: Prerequisites |
This example assumes that you have a basic understanding of kubernetes [services](https://kubernetes.io/docs/user-guide/services.md) and that you have forked the repository and [turned up a Kubernetes cluster](https://kubernetes.io/docs/getting-started-guides/): |
```sh |
$ cd kubernetes |
$ cluster/kube-up.sh |
``` |
### Step One: Set up Cloud SQL instance |
Follow the [official instructions](https://cloud.google.com/sql/docs/getting-started) to set up Cloud SQL instance. |
In the remaining part of this example we will assume that your instance is named "phabricator-db", has IP 1.2.3.4, is listening on port 3306 and the password is "1234". |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.