apiVersion: v1
kind: Service
metadata:
  name: nats-srv
spec:
  selector:
    app: nats
  ports:
    - name: tcp-client
      protocol: TCP
      port: 4222
      targetPort: 4222
    - name: tcp-monitoring
      protocol: TCP
      port: 8222
      targetPort: 8222
  type: ClusterIP

