-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapi-server.yml
72 lines (60 loc) · 1.44 KB
/
api-server.yml
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
apiVersion: apps/v1
kind: Deployment
metadata:
name: api-server
spec:
replicas: 1
selector:
matchLabels:
app: api-server
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 1
template:
metadata:
labels:
app: api-server
tier: frontend
persistance: disposable
project: news
spec:
containers:
- name: api-server
image: moritzgoeckel/news-service:api-server
imagePullPolicy: Always
ports:
- containerPort: 80
imagePullPolicy: Always
env:
- name: cache-redis-url
value: cache-redis.default.svc.cluster.local
- name: mongo-url
value: mongodb.default.svc.cluster.local
- name: mongo-user
value: root
- name: mongo-pw
value: thepw
- name: elastic-url
value: elastic.default.svc.cluster.local
---
apiVersion: v1
kind: Service
metadata:
name: api-server
namespace: default
labels:
project: news
tier: frontend
app: api-server
spec:
type: LoadBalancer
ports:
- port: 80
nodePort: 30003
protocol: TCP
selector:
app: api-server
# Internal URL
# api-server.default.svc.cluster.local