kind: Deployment
apiVersion: extensions/v1beta1
metadata:
  name: rocketmq-ns-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: rocketmq-nameserver
      name: rocketmq-nameserver
  template:
    metadata:
     labels:
      app: rocketmq-nameserver
      name: rocketmq-nameserver
    spec:
      containers:
      - name: rocketmq-nameserver
        image: apache/rocketmq:ROCKETMQ_VERSION
        command: ["sh","mqnamesrv"]
        imagePullPolicy: IfNotPresent
        ports:
          - containerPort: 9876
        volumeMounts:
          - mountPath: /home/rocketmq/logs
            name: namesrvlogs
      volumes:
      - name: namesrvlogs
        emptyDir: {}
      - name: namesrvstore 
        emptyDir: {}
---          
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
  name: rocketmq-broker-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: rocketmq-broker
      name: rocketmq-broker
  template:
    metadata:
     labels:
      app: rocketmq-broker
      name: rocketmq-broker
    spec:
      containers:
      - name: rocketmq-broker
        image: apache/rocketmq:ROCKETMQ_VERSION
        command: ["sh","mqbroker", "-n","rocketmq-ns-deployment:9876"]
        imagePullPolicy: IfNotPresent
        ports:
          - containerPort: 10909
          - containerPort: 10911
        volumeMounts:
          - mountPath: /home/rocketmq/logs
            name: brokerlogs
          - mountPath: /home/rocketmq/store
            name: brokerstore
      volumes:
      - name: brokerlogs
        emptyDir: {}
      - name: brokerstore
        emptyDir: {}


