<p>I'm trying to deploy rocketmq on my testing cluster. I started from the scripts provided in the apache/rocketmq-docker repo on github, but they do not work. I created my own yaml deployment starting from the one in the repo I previously cited, and it works for mqnamsrv, but not for broker. In the following the 2 deployments:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: rocketmq-namesrv
spec:
  replicas: 1
  selector:
    matchLabels:
      app: rocketmq-namesrv
  template:
    metadata:
      labels:
        app: rocketmq-namesrv
    spec:
      containers:
      - name: namesrv
        image: myrepo/rocketmq:4.9.3-alpine
        command: [&quot;sh&quot;, &quot;mqnamesrv&quot;]
        imagePullPolicy: IfNotPresent
        resources:
          limits:
            memory: &quot;128Mi&quot;
            cpu: &quot;400m&quot;
        ports:
        - containerPort: 9876
        volumeMounts:
        - name: namesrv-log
          mountPath: /var/log
      volumes:
      - name: namesrv-log
        persistentVolumeClaim:
          claimName: rocketmq-namesrv-pvc

---

apiVersion: apps/v1
kind: Deployment
metadata:
  name: rocketmq-broker
spec:
  replicas: 1
  selector:
    matchLabels:
      app: rocketmq-broker
  template:
    metadata:
      labels:
        app: rocketmq-broker
    spec:
      containers:
      - name: broker
        image: myrepo/rocketmq:4.9.3-alpine
        command: [&quot;sh&quot;, &quot;mqbroker&quot;, &quot;-n&quot;, &quot;localhost:9876&quot;]
        imagePullPolicy: IfNotPresent
        resources:
          limits:
            memory: &quot;128Mi&quot;
            cpu: &quot;400m&quot;
        ports:
        - containerPort: 10909
        - containerPort: 10911
        volumeMounts:
        - name: broker-log
          mountPath: /var/log
        - name: broker-store
          mountPath: /home/rocketmq
      volumes:
      - name: broker-log
        persistentVolumeClaim:
          claimName: rocketmq-broker-log-pvc
      - name: broker-store
        persistentVolumeClaim:
          claimName: rocketmq-broker-store-pvc
</code></pre>
<p>The image <code>rocketmq:4.9.3-alpine</code> was created following the procedure on the apache/rocketmq-docker repo.</p>
<p>After the deployment the rocketmq-namesrv works, but the broker's pod logs: <code>sh: can't open 'mqbroker': No such file or directory</code>. ut if I try to run manually the container with <code>kubectl run -ti rocketmq-broker --image=myrepo/rocketmq:4.9.3-alpine --restart=Never -- sh mqbroker -n localhost:9876</code> it works...</p>
<p><em>What could it be the problem in the yaml? Am I making something wrong?</em></p>

sctx
<p>I think the problem is with the mount path.</p>
<pre><code>        - name: broker-store
          mountPath: /home/rocketmq
</code></pre>
<p>So your binaries won't be there and so the error</p>
