Now that we know how to build and deploy a container on Cloud Run on GKE, the next step is to explore how to link this together with other services to create an application. With our application deployed on GKE, we now need to configure Cloud Storage and Cloud Pub/Sub.
For our example, we are going to build a form to call our announce service:
- Create a new directory called simple-form:
mkdir simple-form && cd $_
- Initialize the environment:
npm init --yes
- Edit the package.json file and add the start command:
…
"scripts": {
"start": "node index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
...
- Install the npm packages (pug and express):
npm install pug
npm install express
In the following code, we will call our announce-service:1.0. Replace the service...