apiVersion: apps/v1
kind: Deployment
metadata:
  name: nats
  namespace: nextcloud
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nats
  template:
    metadata:
      labels:
        app: nats
    spec:
      containers:
        - name: nats
          image: nats:latest
          ports:
            - containerPort: 4222
---
apiVersion: v1
kind: Service
metadata:
  name: nats
  namespace: nextcloud
spec:
  selector:
    app: nats
  ports:
    - name: client
      port: 4222
      targetPort: 4222
