apiVersion: v1
kind: Service
metadata:
  name: mqtt-tls
  namespace: mosquitto
  labels:
    app: mosquitto
spec:
  ports:
  - port: 8883
    protocol: TCP
    targetPort: mqtts
    name: mqtts
  selector:
    app: mosquitto
  type: LoadBalancer
---
apiVersion: v1
kind: Service
metadata:
  name: mqtt-plain
  namespace: mosquitto
  labels:
    app: mosquitto
spec:
  ports:
  - port: 1883
    protocol: TCP
    targetPort: mqtt
  selector:
    app: mosquitto
  type: ClusterIP
