apiVersion: apps/v1
kind: Deployment

metadata:
  name: nats-node

spec:
  template:
    metadata:
      name: natsnode
      labels:
        type: nats-server
        role: nats-node

    spec:
      containers:
        - name: natsnode
          image: nats
          ports:
            - containerPort: 4222
              hostPort: 4222
            - containerPort: 4223
              hostPort: 4223
          args: [ "--debug","--trace","-cluster","nats://0.0.0.0:4223","-routes","nats://nats-seednode-cluster:4223" ]
      restartPolicy: Always


  replicas: 2

  selector:
    matchLabels:
      role: nats-node