forked from edureka-git/DevOpsClassCodes
-
Notifications
You must be signed in to change notification settings - Fork 639
Expand file tree
/
Copy pathdeployment.yaml
More file actions
39 lines (38 loc) · 755 Bytes
/
deployment.yaml
File metadata and controls
39 lines (38 loc) · 755 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
kind: Deployment
apiVersion: apps/v1
metadata:
name: kubeserve
spec:
replicas: 2
minReadySeconds: 10 # wait for 45 sec before going to deploy next pod
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 1 # max number of pods to run for the deployment
selector:
matchLabels:
app: kubeserve
template:
metadata:
name: kubeserve
labels:
app: kubeserve
spec:
containers:
- name: app
image: kalyand14/myimage:<TAG>
imagePullPolicy: Always
---
kind: Service
apiVersion: v1
metadata:
name: kubeserve-svc
spec:
type: NodePort
ports:
- port: 8080
targetPort: 8080
nodePort: 30009
selector:
app: kubeserve