-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8sdeploy.yaml
70 lines (70 loc) · 1.38 KB
/
k8sdeploy.yaml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
apiVersion: v1
kind: Namespace
metadata:
name: playground-k8s
---
apiVersion: v1
kind: Service
metadata:
name: poc-api-svc
namespace: playground-k8s
labels:
app: poc-api
tier: app
version: v1
spec:
type: ClusterIP #LoadBalancer only Cloud
ports:
- port: 80
selector:
app: poc-api
tier: app
version: v1
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: poc-api
namespace: playground-k8s
labels:
app: poc-api
tier: app
version: v1
spec:
selector:
matchLabels:
app: poc-api
tier: app
version: v1
replicas: 2
template:
metadata:
labels:
app: poc-api
tier: app
version: v1
spec:
restartPolicy: Always
containers:
- name: poc-api
image: jcmds/poc-api
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
initialDelaySeconds: 15
periodSeconds: 30
httpGet:
path: /swagger/index.html
port: 80
resources:
requests:
cpu: 25m
memory: 200Mi
imagePullPolicy: IfNotPresent
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 25%
maxSurge: 25%