Skip to content

Commit

Permalink
Create app-v2.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
DeekshithSN committed Dec 4, 2021
1 parent a412768 commit 9c7910d
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions ingress/app-v2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
apiVersion: v1
kind: Service
metadata:
name: my-app
labels:
app: my-app
spec:
type: NodePort
ports:
- name: http
port: 80
targetPort: http

# Note here that we match both the app and the version
selector:
app: my-app
version: v2.0.0
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app-v1
labels:
app: my-app
spec:
replicas: 1
selector:
matchLabels:
app: my-app
version: v2.0.0
template:
metadata:
labels:
app: my-app
version: v2.0.0
spec:
containers:
- name: my-app
image: deekshithsn/k8s-deployment-strategies
ports:
- name: http
containerPort: 8080
- name: probe
containerPort: 8086
env:
- name: VERSION
value: v2.0.0
livenessProbe:
httpGet:
path: /live
port: probe
initialDelaySeconds: 5
periodSeconds: 5
readinessProbe:
httpGet:
path: /ready
port: probe
periodSeconds: 5

0 comments on commit 9c7910d

Please sign in to comment.