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