forked from dhinojosa/spinnaker-study
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeploy-microservice.yml
65 lines (60 loc) · 1.54 KB
/
deploy-microservice.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
kind: Deployment
apiVersion: apps/v1
metadata:
labels:
app: dirty-jar-microservice
stack: frontend
source: demo
name: dirty-jar-microservice
namespace: microservices
spec:
replicas: 3
selector:
matchLabels:
run: dirty-jar-microservice
template:
metadata:
labels:
app: dirty-jar-microservice
run: dirty-jar-microservice
source: demo
spec:
containers:
- image: 219099013464.dkr.ecr.us-west-2.amazonaws.com/dirty-jar-microservice
name: dirty-jar-microservice
ports:
- name: web
containerPort: 8080
---
kind: Service
apiVersion: v1
metadata:
labels:
app: dirty-jar-microservice-service
name: dirty-jar-microservice-service
namespace: microservices
spec:
selector:
source: demo
app: dirty-jar-microservice
ports:
- name: web
protocol: TCP
port: 30201
targetPort: 8080
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$2
name: dirty-jar-ingress
namespace: microservices
spec:
rules:
- http:
paths:
- path: /dirty-jar(/|$)(.*)
backend:
serviceName: dirty-jar-microservice-service
servicePort: 30201