Files
IoT/deployments/k8s/emqx-ws-ingress.yaml
T
Naeel 150146edba deploy: EMQX, iot-operator, managed Postgres, Docker Hub image
- Добавлен EMQX deployment + WS ingress (адаптирован из sless)
- Добавлен iot-operator deployment с RBAC (ServiceAccount, ClusterRole)
- Postgres: заменён self-hosted на managed (dc5db45d namespace)
- Image: naeel/iot-operator:v0.2.0 (Docker Hub)
- Убран imagePullSecrets (Docker Hub публичный)
2026-04-12 16:07:41 +03:00

69 lines
2.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Создано: 2026-04-12
# MQTT over WebSocket через Ingress с TLS termination.
# Причина: порт 1883 заблокирован NSX-T Edge firewall на уровне облака.
# Решение: EMQX WebSocket listener (8083) проксируется через nginx-ingress с TLS.
#
# IoT устройство подключается: wss://iot.kube5s.ru/mqtt
# IoT Консоль (UI): https://iot.kube5s.ru/console
#
# DNS A-запись: iot.kube5s.ru → 185.247.187.147
# TLS: cert-manager + letsencrypt-prod, secret=iot-kube5s-ru-tls
#
# Применение: kubectl apply -f deployments/k8s/emqx-ws-ingress.yaml
---
apiVersion: v1
kind: Service
metadata:
name: emqx-ws
namespace: sless
# Отдельный Service — WebSocket порт для Ingress
spec:
selector:
app: emqx
ports:
- name: mqtt-ws
port: 8083
targetPort: 8083
protocol: TCP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: emqx-mqtt-websocket
namespace: sless
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/ssl-redirect: "true"
# WebSocket: nginx-ingress добавляет Upgrade/Connection при proxy-http-version=1.1
nginx.ingress.kubernetes.io/proxy-http-version: "1.1"
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
spec:
ingressClassName: nginx
tls:
- hosts:
- iot.kube5s.ru
secretName: iot-kube5s-ru-tls
rules:
- host: iot.kube5s.ru
http:
paths:
# MQTT over WebSocket — wss://iot.kube5s.ru/mqtt
- path: /mqtt
pathType: Exact
backend:
service:
name: emqx-ws
port:
number: 8083
# IoT Консоль (UI) — https://iot.kube5s.ru/console
- path: /console
pathType: Exact
backend:
service:
name: iot-operator
port:
number: 9090