-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment.yaml
46 lines (46 loc) · 949 Bytes
/
deployment.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
# API service and deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: api-demo
spec:
replicas: 3 # tells the service to run 3 pods with this deployment
selector:
matchLabels:
app: api-demo
template:
metadata:
labels:
app: api-demo
spec:
containers:
- name: api-demo
image: sergeysedelnikovstoraenso/kubernetes-demo-api:1.0.1
resources:
requests:
cpu: 70m
memory: 128Mi
limits:
cpu: 250m
memory: 256Mi
ports:
- containerPort: 80
env:
- name: 'NODE_ENV'
value: 'production'
- name: PORT
value: '80'
---
apiVersion: v1
kind: Service
metadata:
name: api-demo
labels:
name: api-demo
spec:
loadBalancerIP: 104.40.142.136
type: LoadBalancer
ports:
- port: 80
selector:
app: api-demo