text stringlengths 0 59.1k |
|---|
{ |
"kind": "Pod", |
"apiVersion": "v1", |
"metadata": { |
"name": "mongo", |
"labels": { |
"name": "mongo", |
"role": "mongo" |
} |
}, |
"spec": { |
"volumes": [ |
{ |
"name": "mongo-disk", |
"gcePersistentDisk": { |
"pdName": "mongo-disk", |
"fsType": "ext4" |
} |
} |
], |
"containers": [ |
{ |
"name": "mongo", |
"image": "mongo:latest", |
"ports": [ |
{ |
"name": "mongo", |
"containerPort": 27017 |
} |
], |
"volumeMounts": [ |
{ |
"name": "mongo-disk", |
"mountPath": "/data/db" |
} |
] |
} |
] |
} |
} |
<|endoftext|> |
# source: k8s_examples/_archived/meteor/README.md type: docs |
Meteor on Kubernetes |
==================== |
This example shows you how to package and run a |
[Meteor](https://www.meteor.com/) app on Kubernetes. |
Get started on Google Compute Engine |
------------------------------------ |
Meteor uses MongoDB, and we will use the `GCEPersistentDisk` type of |
volume for persistent storage. Therefore, this example is only |
applicable to [Google Compute |
Engine](https://cloud.google.com/compute/). Take a look at the |
[volumes documentation](https://kubernetes.io/docs/user-guide/volumes.md) for other options. |
First, if you have not already done so: |
1. [Create](https://cloud.google.com/compute/docs/quickstart) a |
[Google Cloud Platform](https://cloud.google.com/) project. |
2. [Enable |
billing](https://developers.google.com/console/help/new/#billing). |
3. Install the [gcloud SDK](https://cloud.google.com/sdk/). |
Authenticate with gcloud and set the gcloud default project name to |
point to the project you want to use for your Kubernetes cluster: |
```sh |
gcloud auth login |
gcloud config set project <project-name> |
``` |
Next, start up a Kubernetes cluster: |
```sh |
wget -q -O - https://get.k8s.io | bash |
``` |
Please see the [Google Compute Engine getting started |
guide](https://kubernetes.io/docs/getting-started-guides/gce.md) for full |
details and other options for starting a cluster. |
Build a container for your Meteor app |
------------------------------------- |
To be able to run your Meteor app on Kubernetes you need to build a |
Docker container for it first. To do that you need to install |
[Docker](https://www.docker.com) Once you have that you need to add 2 |
files to your existing Meteor project `Dockerfile` and |
`.dockerignore`. |
`Dockerfile` should contain the below lines. You should replace the |
`ROOT_URL` with the actual hostname of your app. |
``` |
FROM chees/meteor-kubernetes |
ENV ROOT_URL http://myawesomeapp.com |
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.