<p>Trying to start up rabbitmq in K8s while attaching a configmap gives me the following error:</p>

<pre><code>/usr/local/bin/docker-entrypoint.sh: line 367: rabbitmq-plugins: command not found
/usr/local/bin/docker-entrypoint.sh: line 405: exec: rabbitmq-server: not found
</code></pre>

<p>Exactly the same setup is working fine with docker-compose, so I am a bit lost. Using <code>rabbitmq:3.8.3</code></p>

<p>Here is a snippet from my deployment:</p>

<pre><code>  "template": {
      "metadata": {
        "creationTimestamp": null,
        "labels": {
          "app": "rabbitmq"
        }
      },
      "spec": {
        "volumes": [
          {
            "name": "rabbitmq-configuration",
            "configMap": {
              "name": "rabbitmq-configuration",
              "defaultMode": 420
            }
          }
        ],
        "containers": [
          {
            "name": "rabbitmq",
            "image": "rabbitmq:3.8.3",
            "ports": [
              {
                "containerPort": 5672,
                "protocol": "TCP"
              }
            ],
            "env": [
              {
                "name": "RABBITMQ_DEFAULT_USER",
                "value": "guest"
              },
              {
                "name": "RABBITMQ_DEFAULT_PASS",
                "value": "guest"
              },
              {
                "name": "RABBITMQ_ENABLED_PLUGINS_FILE",
                "value": "/opt/enabled_plugins"
              }
            ],
            "resources": {},
            "volumeMounts": [
              {
                "name": "rabbitmq-configuration",
                "mountPath": "/opt/"
              }
            ],
            "terminationMessagePath": "/dev/termination-log",
            "terminationMessagePolicy": "File",
            "imagePullPolicy": "IfNotPresent"
          }
        ],
        "restartPolicy": "Always",
        "terminationGracePeriodSeconds": 30,
        "dnsPolicy": "ClusterFirst",
        "securityContext": {},
        "schedulerName": "default-scheduler"
      }
    },
</code></pre>

<p>And here is the configuration:</p>

<pre><code>{
  "kind": "ConfigMap",
  "apiVersion": "v1",
  "metadata": {
    "name": "rabbitmq-configuration",
    "namespace": "e360",
    "selfLink": "/api/v1/namespaces/default/configmaps/rabbitmq-configuration",
    "uid": "28071976-98f6-11ea-86b2-0244a03303e1",
    "resourceVersion": "1034540",
    "creationTimestamp": "2020-05-18T10:55:58Z"
  },
  "data": {
    "enabled_plugins": "[rabbitmq_management].\n"
  }
}
</code></pre>

Giannis
<p>That's because you're monting a volume in <code>/opt</code>, which is the rabbitmq home path.</p>

<p>So, the entrypoint script cannot find any of the rabbitmq binaries.<br>
You can see the rabbitmq Dockerfile <a href="https://github.com/docker-library/rabbitmq/blob/91be7cf597c069c9a038ae2619adac1a85e68d4d/3.8/ubuntu/Dockerfile" rel="nofollow noreferrer">here</a></p>
