-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeployment.yaml
More file actions
78 lines (78 loc) · 1.99 KB
/
deployment.yaml
File metadata and controls
78 lines (78 loc) · 1.99 KB
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
71
72
73
74
75
76
77
78
apiVersion: apps/v1
kind: Deployment
metadata:
name: blockchain-deployment
namespace: default
spec:
replicas: 1
selector:
matchLabels:
bb: web
template:
metadata:
labels:
bb: web
spec:
containers:
- name: blockchain-container
image: blockchain:v3
imagePullPolicy: Never
env:
- name: PORT
value: "3000"
readinessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 2
periodSeconds: 2
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 10
resources:
limits:
memory: 200Mi
requests:
cpu: 200m
memory: 200Mi
#Adding same container to test things
- name: blockchain-container2
image: blockchain:v3
imagePullPolicy: Never
env:
- name: PORT
value: "3001"
readinessProbe:
httpGet:
path: /
port: 3001
initialDelaySeconds: 2
periodSeconds: 2
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 10
resources:
limits:
memory: 200Mi
requests:
cpu: 200m
memory: 200Mi
---
apiVersion: v1
kind: Service
metadata:
name: blockchain-service
namespace: default
spec:
type: NodePort
selector:
bb: web
ports:
- port: 3000
targetPort: 3000
nodePort: 30001
name: container-1
- port: 3001
targetPort: 3001
nodePort: 30002
name: container-2