apiVersion: v1
kind: Pod
metadata:
  labels:
    name: nsq 
  name: nsq
spec:
  containers:
    - name: nsqlookup
      image: nsqio/nsq
      command:
        - /nsqlookupd
      ports:
        - containerPort: 4160
          name: tcp
          protocol: TCP
        - containerPort: 4161
          name: http
          protocol: TCP
    - name: nsqd
      image: nsqio/nsq 
      command:
        - /nsqd
        - --lookupd-tcp-address=localhost:4160
      ports:
        - containerPort: 4150
          name: tcp
          protocol: TCP
        - containerPort: 4151
          name: http
          protocol: TCP
        - containerPort: 4152
          name: https
          protocol: TCP
      resources:
        limits:
          cpu: "0.1"
      volumeMounts:
        - mountPath: /data
          name: nsqvol
    - name: nsqadmin
      image: nsqio/nsq
      command:
        - /nsqadmin
        - --lookupd-http-address=localhost:4160
      ports:
        - containerPort: 4171
          name: http
          protocol: TCP
  volumes:
    - name: nsqvol
      nfs:
        server: 10.10.7.151
        path: /nfs/nsq
        readOnly: false