I'm trying to set up a single-node RabbitMQ (version 4.1.1) on Kubernetes without relying on an operator. I want a straightforward single-node deployment, but I'm encountering some issues related to the directory structure. I've mounted a Data PVC to `/bitnami/rabbitmq/mnesia` and a Config PVC to `/opt/bitnami/rabbitmq/var/lib/rabbitmq`, but I'm facing a permission error that says: "cannot touch '/opt/bitnami/rabbitmq/var/lib/rabbitmq/.start': Permission denied." What might be going wrong here?
2 Answers
I'm not sure why you wouldn't want to use a deployment for this setup. Using a StatefulSet could be a better fit since it’s designed for stateful applications like databases and message queues. But I totally get avoiding the operator. Just keep in mind that switching to a StatefulSet won't solve your permission issues directly.
It sounds like RabbitMQ is trying to create the `.start` file during its startup process but is hitting a permission barrier. This could be due to several factors: it might be that the directory structure doesn't exist, the mounted directory lacks write permissions, or the user ID running the process may not have the necessary access rights. Also, check if the entire Persistent Volume (PV) has write permissions enabled. You might want to look into the RABBITMQ_PID_FILE environment variable in the config file to ensure it’s set up correctly.
Yeah, I could switch to a StatefulSet, but I don't think that would solve my permissions problem.