Skip to content

Instantly share code, notes, and snippets.

@yusinto
Last active March 21, 2018 04:42
Show Gist options
  • Save yusinto/9536fa7dcd28106efee7f8b217a9d06a to your computer and use it in GitHub Desktop.
Save yusinto/9536fa7dcd28106efee7f8b217a9d06a to your computer and use it in GitHub Desktop.
Kubernetes minimal deployment template to deploy a vue node js app
kind: Deployment
apiVersion: apps/v1beta1
metadata:
name: _BRANCH_NAME-deployment
labels:
branchName: _BRANCH_NAME
spec:
replicas: 2
selector:
matchLabels:
branchName: _BRANCH_NAME
template:
metadata:
labels:
branchName: _BRANCH_NAME
spec:
containers:
- name: _BRANCH_NAME
image: gcr.io/gke-playground/_BRANCH_NAME:_TAG
ports:
- containerPort: 80
---
kind: Service
apiVersion: v1
metadata:
name: _BRANCH_NAME-service
labels:
branchName: _BRANCH_NAME
spec:
selector:
branchName: _BRANCH_NAME
ports:
- protocol: TCP
port: 80
targetPort: 80
type: LoadBalancer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment