forked from Sonal0409/DevOps_ClassNotes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeployment.yml
More file actions
37 lines (36 loc) · 707 Bytes
/
deployment.yml
File metadata and controls
37 lines (36 loc) · 707 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
kind: Deployment
apiVersion: apps/v1
metadata:
name: kubeserve
spec:
replicas: 3
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: leaddevops/kubeserve:v1
---
kind: Service
apiVersion: v1
metadata:
name: kubeserve-svc
spec:
type: NodePort
ports:
- port: 80
targetPort: 80
selector:
app: kubeserve