-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathweather-app-forecast.yaml
60 lines (58 loc) · 1.25 KB
/
weather-app-forecast.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
---
apiVersion: v1
kind: ConfigMap
metadata:
name: weather-app-forecast-data
namespace: apps
data:
api.json: |
{
"weather": {
"1": { "city": "GopherCity", "weather": "Cloudy", "dt": "3128231402" },
"2": { "city": "City of Gopher", "weather": "Rainy", "dt": "3128231402" },
"3": { "code": "GopherCentral", "weather": "Shiny", "dt": "3128231402" }
}
}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: weather-app-forecast
namespace: apps
spec:
replicas: 1
selector:
matchLabels:
app: weather-app-forecast
template:
metadata:
labels:
app: weather-app-forecast
spec:
containers:
- name: api
image: ghcr.io/traefik/api-server:v1.2.0
args: ["-data", "/api/api.json", "-errorrate", "2"]
imagePullPolicy: IfNotPresent
volumeMounts:
- name: api-data
mountPath: /api
volumes:
- name: api-data
configMap:
name: weather-app-forecast-data
---
apiVersion: v1
kind: Service
metadata:
name: weather-app-forecast
namespace: apps
labels:
app: weather-app-forecast
spec:
type: ClusterIP
ports:
- port: 3000
name: api
selector:
app: weather-app-forecast