-
Notifications
You must be signed in to change notification settings - Fork 3
/
catalogue-k8s-deployment.yml
57 lines (55 loc) · 1.34 KB
/
catalogue-k8s-deployment.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
apiVersion: v1
kind: Service
metadata:
name: catalogue-service
namespace: onlinestore-demo
spec:
ports:
- port: 8010
protocol: TCP
targetPort: 8010
selector:
app: catalogue-service-app
sessionAffinity: None
type: ClusterIP #internal IPs withing K8s cluster,exposed to external IP with Ingress Load balancer service
status:
loadBalancer: {}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: catalogue-service-app-deployment
namespace: onlinestore-demo
spec:
selector:
matchLabels:
app: catalogue-service-app
replicas: 3 # tells deployment to run N pods matching the template
template: # create pods using pod definition in this template
metadata:
labels:
app: catalogue-service-app
spec:
containers:
- name: catalogue-service-app
image: itsrajivsrivastava/catalogue-service
ports:
- containerPort: 8010
name: server
imagePullSecrets: # Only required with private image repository like Harbor,jFrog etc
- name: regcred
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: catalogue-service-app-ingress
namespace: default
spec:
rules:
- host: demo.my-pks.cloudification.in
http:
paths:
- backend:
serviceName: catalogue-service
servicePort: 8010
path: /catalogue