Hosting a Node.js application on Kubernetes Engine
We will containerize the KeystoneJS application and host it on Google Kubernetes Engine (GKE). GKE is powered by the container management system, Kubernetes. Containers are built to do one specific task, and so we'll separate the application and the database as we did for App Engine.
The MongoDB container will host the MongoDB database with the data stored on external disks. The data within a container is transient, and so we need an external disk to safely store the MongoDB data. The App Container includes a Node.js runtime, that will run our KeystoneJS application.
It will communicate with the Mongo Container and also expose itself to the end user:
Note
You'll be using the following services and others for this recipe:
Â
- Google Kubernetes Engine
- GCE
- Google Container Registry
Getting ready
The following are the initial setup verification steps to be taken before the recipe can be executed:
- Create or select a GCP project.
- Enable billing and enable...