-
Notifications
You must be signed in to change notification settings - Fork 6
/
deployment.yml
155 lines (154 loc) · 3.04 KB
/
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: wowza
namespace: default
spec:
volumeName: wowza
storageClassName: local-storage
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Gi
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: wowza
spec:
capacity:
storage: 100Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
storageClassName: local-storage
local:
path: /your/server/storage/path
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- your-server-hostname
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: wowza
labels:
app: wowza
spec:
replicas: 1
selector:
matchLabels:
app: wowza
template:
metadata:
labels:
app: wowza
spec:
containers:
- name: wowza
resources:
limits:
memory: 2048Mi
requests:
memory: 1028Mi
image: your-image-registry/your-docker-wowza-image
volumeMounts:
- mountPath: /usr/local/WowzaStreamingEngine/data
name: wowza
imagePullSecrets:
- name: needed-if-private-registry
volumes:
- name: wowza
persistentVolumeClaim:
claimName: wowza
nodeSelector:
kubernetes.io/hostname: your-server-hostname
---
apiVersion: v1
kind: Service
metadata:
name: wowza
spec:
selector:
app: wowza
ports:
- port: 8086
targetPort: 8086
protocol: TCP
name: tcp2
- port: 8087
targetPort: 8087
protocol: TCP
name: tcp3
- port: 8088
targetPort: 8088
protocol: TCP
name: tcp4
- port: 80
targetPort: 80
protocol: TCP
name: tcp5
# - port: 1935 # RTMP/RTMPT/RTMPE/RTSP(interleaved)
# targetPort: 1935
# protocol: TCP
# name: rtmps
---
apiVersion: v1
kind: Service
metadata:
name: wowza-rtmps
spec:
type: NodePort
selector:
app: wowza
ports:
- port: 1935 # RTMP/RTMPT/RTMPE/RTSP(interleaved)
targetPort: 1935
protocol: TCP
name: rtmp
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: wowza
annotations:
kubernetes.io/tls-acme: 'true'
spec:
tls:
- hosts:
- wowza.your-domain.com
secretName: wowza-tls
rules:
- host: wowza.your-domain.com
http:
paths:
- path: /
backend:
serviceName: wowza
servicePort: 8088
# - path: /8088
# backend:
# serviceName: wowza
# servicePort: 8088
# - path: /8087
# backend:
# serviceName: wowza
# servicePort: 8087
- path: /8086
backend:
serviceName: wowza
servicePort: 8086
# - path: /1935
# backend:
# serviceName: wowza
# servicePort: 1935
# - path: /80
# backend:
# serviceName: wowza
# servicePort: 80