forked from zhuzhenguang/order-service
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathkube.yaml
executable file
·55 lines (55 loc) · 1.03 KB
/
kube.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
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{service}}
namespace: {{namespace}}
spec:
replicas: 1
selector:
matchLabels:
k8s-app: {{service}}
template:
metadata:
labels:
k8s-app: {{service}}
version: v1
spec:
containers:
- name: {{service}}
image: {{image}}
imagePullPolicy: IfNotPresent
ports:
- containerPort: 5000
env:
- name: SPRING_PROFILES_ACTIVE
value: {{profiles}}
imagePullSecrets:
- name: ecr-secret
---
kind: Service
apiVersion: v1
metadata:
namespace: {{namespace}}
name: {{service}}
spec:
selector:
k8s-app: {{service}}
ports:
- port: 5000
name: http
protocol: TCP
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{service}}
namespace: {{namespace}}
spec:
rules:
- host: {{service}}.{{team}}.cloud.school.thoughtworks.cn
http:
paths:
- path: /
backend:
serviceName: {{service}}
servicePort: 5000