This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: node-hello-world | |
name: node-hello-world | |
namespace: default | |
spec: | |
replicas: 3 | |
selector: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:slim | |
# Create app directory | |
WORKDIR /usr/src/app | |
# Install app dependencies | |
# A wildcard is used to ensure both package.json AND package-lock.json are copied | |
# where available (npm@5+) | |
COPY package*.json ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const express = require('express'); | |
// Constants | |
const PORT = 8080; | |
const HOST = '0.0.0.0'; | |
// App | |
const app = express(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "google_container_cluster" "primary" { | |
name = "my-gke-cluster" | |
location = "us-central1" | |
# We can't create a cluster with no node pool defined, but we want to only use | |
# separately managed node pools. So we create the smallest possible default | |
# node pool and immediately delete it. | |
remove_default_node_pool = true | |
initial_node_count = 1 |