apiVersion: v1
kind: Service
metadata:
  labels:
    vernemq: k8s
  name: vernemq-k8s
  namespace: messaging
spec:
  ports:
  - name: mqtt
    port: 1883
    targetPort: mqtt
  - name: mqtts
    port: 8883
    targetPort: mqtts
  - name: mqtt-ws
    port: 8080
    targetPort: mqtt-ws
  - name: http
    port: 8888
    targetPort: http
  selector:
    app: vernemq
    vernemq: k8s
  sessionAffinity: ClientIP
