Skip to content

Instantly share code, notes, and snippets.

@tanan
Created October 9, 2018 04:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tanan/e7e09b9d29d54bbf3fa519e91f088d91 to your computer and use it in GitHub Desktop.
Save tanan/e7e09b9d29d54bbf3fa519e91f088d91 to your computer and use it in GitHub Desktop.
nginx deployment yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-blue
namespace: sample-ns
spec:
replicas: 1
selector:
matchLabels:
app: nginx
version: blue
template:
metadata:
name: nginx
labels:
app: nginx
version: blue
spec:
containers:
- name: nginx
image: nginx:1.13
ports:
- containerPort: 80
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-green
namespace: sample-ns
spec:
replicas: 1
selector:
matchLabels:
app: nginx
version: green
template:
metadata:
name: nginx
labels:
app: nginx
version: green
spec:
containers:
- name: nginx
image: nginx:1.13
ports:
- containerPort: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment