-
Notifications
You must be signed in to change notification settings - Fork 8
/
ingress-deployment.yml
72 lines (71 loc) · 1.52 KB
/
ingress-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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
apiVersion: apps/v1
kind: Deployment
metadata:
name: apim-ingress-pod
spec:
replicas: 1
selector:
matchLabels:
app: apim-ingress-pod
template:
metadata:
labels:
app: apim-ingress-pod
spec:
containers:
- name: azure-apim-gateway
image: mcr.microsoft.com/azure-api-management/gateway:2.4.0
ports:
- name: http
containerPort: 8080
- name: https
containerPort: 8081
resources:
limits:
memory: "128Mi"
cpu: "100m"
env:
- name: k8s.ingress.namespace
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: k8s.ingress.enabled
value: "true"
---
apiVersion: v1
kind: Service
metadata:
name: apim-ingress-service
spec:
selector:
app: apim-ingress-pod
type: LoadBalancer
ports:
- port: 80
name: ingress-http
targetPort: 8080
- port: 443
name: ingress-https
targetPort: 8081
---
apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata:
name: apim-ingress
annotations:
ingressclass.kubernetes.io/is-default-class: "true"
spec:
controller: azure-api-management/gateway
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: ingress-rbac
subjects:
- kind: ServiceAccount
name: default
namespace: gw
roleRef:
kind: ClusterRole
name: cluster-admin
apiGroup: rbac.authorization.k8s.io