-
Notifications
You must be signed in to change notification settings - Fork 0
/
podIngressKong.yml
61 lines (61 loc) · 1.1 KB
/
podIngressKong.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: $(podName)
namespace: $(namespace)
labels:
app: $(podName)
spec:
replicas: 1
selector:
matchLabels:
app: $(podName)
template:
metadata:
labels:
app: $(podName)
spec:
containers:
- name: $(podName)
image: $(dockerImage)
ports:
- name: $(podName)
containerPort: $(containerPort)
---
apiVersion: v1
kind: Service
metadata:
name: $(serviceName)
namespace: $(namespace)
annotations:
konghq.com/protocol: http
spec:
selector:
app: $(podName)
ports:
- name: http
protocol: TCP
port: 80
targetPort: $(containerPort)
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-$(serviceName)
namespace: $(namespace)
annotations:
konghq.com/strip-path: "true"
konghq.com/protocol: http
spec:
ingressClassName: kong
rules:
- host: "test.example.com"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: $(serviceName)
port:
number: 80