-
Notifications
You must be signed in to change notification settings - Fork 1
/
kubernetes.yaml
114 lines (102 loc) · 1.73 KB
/
kubernetes.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
apiVersion: v1
kind: Namespace
metadata:
name: anton
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
labels:
app: redis
spec:
selector:
matchLabels:
app: redis
replicas: 1
template:
metadata:
labels:
app: redis
spec:
containers:
- name: redis
image: redis
ports:
- containerPort: 6379
---
apiVersion: v1
kind: Service
metadata:
name: redis
labels:
name: redis
spec:
ports:
- port: 6379
targetPort: 6379
selector:
app: redis
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: ml-system-study
labels:
app: ml-system-study
spec:
replicas: 3
selector:
matchLabels:
app: ml-system-study
template:
metadata:
labels:
app: ml-system-study
spec:
containers:
- name: ml-system-study
image: shemyanton/ml-system-study
imagePullPolicy: Always
ports:
- containerPort: 5000
---
apiVersion: v1
kind: Service
metadata:
name: ml-system-study
labels:
name: ml-system-study
spec:
ports:
- port: 80
targetPort: 5000
selector:
app: ml-system-study
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: anton-ingress
namespace: anton
spec:
entryPoints:
- web
routes:
- match: PathPrefix(`/anton`)
kind: Rule
services:
- name: ml-system-study
port: 80
middlewares:
- name: anton-stripprefix
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: anton-stripprefix
namespace: anton
spec:
stripPrefix:
prefixes:
- /anton