2018-04-30 13:32:38 +02:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: mainflux-nginx
|
|
|
|
labels:
|
|
|
|
app: nginx
|
|
|
|
spec:
|
|
|
|
type: LoadBalancer
|
|
|
|
ports:
|
|
|
|
- port: 80
|
|
|
|
name: http
|
|
|
|
- port: 443
|
|
|
|
name: https
|
2018-05-21 18:18:13 +02:00
|
|
|
- port: 8883
|
|
|
|
name: mqtt
|
2018-04-30 13:32:38 +02:00
|
|
|
selector:
|
|
|
|
app: nginx
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ReplicationController
|
|
|
|
metadata:
|
|
|
|
name: mainflux-nginx
|
|
|
|
spec:
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: nginx
|
|
|
|
spec:
|
|
|
|
volumes:
|
|
|
|
- name: secret-volume
|
|
|
|
secret:
|
|
|
|
secretName: mainflux-secret
|
|
|
|
- name: configmap-volume
|
|
|
|
configMap:
|
|
|
|
name: mainflux-nginx-config
|
|
|
|
containers:
|
2018-05-21 18:18:13 +02:00
|
|
|
- name: mainflux-nginx
|
|
|
|
image: nginx:1.13-alpine
|
2018-04-30 13:32:38 +02:00
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
2018-05-11 16:41:25 +02:00
|
|
|
- containerPort: 443
|
2018-05-21 18:18:13 +02:00
|
|
|
- containerPort: 8883
|
2018-04-30 13:32:38 +02:00
|
|
|
volumeMounts:
|
2018-05-21 18:18:13 +02:00
|
|
|
- mountPath: /etc/ssl/certs/mainflux-server.crt
|
2018-04-30 13:32:38 +02:00
|
|
|
name: secret-volume
|
2018-05-21 18:18:13 +02:00
|
|
|
subPath: mainflux-server.crt
|
|
|
|
- mountPath: /etc/ssl/private/mainflux-server.key
|
|
|
|
name: secret-volume
|
|
|
|
subPath: mainflux-server.key
|
|
|
|
- mountPath: /etc/ssl/certs/dhparam.pem
|
|
|
|
name: secret-volume
|
|
|
|
subPath: dhparam.pem
|
|
|
|
- mountPath: /etc/nginx/nginx.conf
|
2018-04-30 13:32:38 +02:00
|
|
|
name: configmap-volume
|
2018-05-21 18:18:13 +02:00
|
|
|
subPath: nginx.conf
|