<p>I'm using the kubernetes operator <a href="https://www.rabbitmq.com/kubernetes/operator/operator-overview.html" rel="nofollow noreferrer">https://www.rabbitmq.com/kubernetes/operator/operator-overview.html</a> to deploy rabbitmq, however I'm having some issues with advanced config. I did refer to <a href="https://github.com/rabbitmq/rabbitmq-server/blob/master/deps/rabbit/docs/advanced.config.example" rel="nofollow noreferrer">https://github.com/rabbitmq/rabbitmq-server/blob/master/deps/rabbit/docs/advanced.config.example</a> but I'm not sure what I'm missing</p>
<p>I have a receipe such as this:</p>
<pre><code>---
apiVersion: rabbitmq.com/v1beta1
kind: RabbitmqCluster
metadata:
 name: mybunny
spec:
 replicas: 3
 image: rabbitmq:3.10
 rabbitmq:
   advancedConfig: |
     [
      {rabbit,
       [
        {vm_memory_high_watermark, 0.75},
        {disk_free_limit, {mem_relative, 1.0}}
       ]}
     [
      {kernel, []},
     ].
</code></pre>
<p>I think it generated the advanced.config file as I wanted it to look:</p>
<pre><code>$ kubectl exec mybunny-server-2 -it -- cat /etc/rabbitmq/advanced.config
Defaulted container &quot;rabbitmq&quot; out of: rabbitmq, setup-container (init)
[
{rabbit,
 [
  {vm_memory_high_watermark, 0.75},
  {disk_free_limit, {mem_relative, 1.0}}
 ]},
{kernel, []},
].
</code></pre>
<p>However the application always fails to load, I can't figure out where is the syntaxt error</p>
<pre><code>kubectl logs mybunny-server-2                                          
2022-07-19 20:23:25.723748+00:00 [warning] &lt;0.130.0&gt; cluster_formation.randomized_startup_delay_range.min and clus
ter_formation.randomized_startup_delay_range.max are deprecated
2022-07-19 20:23:25.732008+00:00 [error] &lt;0.130.0&gt; Failed to load advanced configuration file &quot;/etc/rabbitmq/advan
ced.config&quot;: unknown POSIX error

BOOT FAILED
===========
Error during startup: {error,failed_to_read_advanced_configuration_file}

2022-07-19 20:23:25.732677+00:00 [error] &lt;0.130.0&gt;  
2022-07-19 20:23:25.732677+00:00 [error] &lt;0.130.0&gt; BOOT FAILED
2022-07-19 20:23:25.732677+00:00 [error] &lt;0.130.0&gt; ===========
2022-07-19 20:23:25.732677+00:00 [error] &lt;0.130.0&gt; Error during startup: {error,failed_to_read_advanced_configurat
ion_file}
2022-07-19 20:23:25.732677+00:00 [error] &lt;0.130.0&gt;  
2022-07-19 20:23:26.734535+00:00 [error] &lt;0.130.0&gt;     supervisor: {local,rabbit_prelaunch_sup}
2022-07-19 20:23:26.734535+00:00 [error] &lt;0.130.0&gt;     errorContext: start_error
2022-07-19 20:23:26.734535+00:00 [error] &lt;0.130.0&gt;     reason: failed_to_read_advanced_configuration_file
</code></pre>
<p>=======================</p>
<p>If I keep the advanced config very simple, the app loads fine</p>
<pre><code> cat mybunny.yaml  
---
apiVersion: rabbitmq.com/v1beta1
kind: RabbitmqCluster
metadata:
 name: mybunny
spec:
 replicas: 3
 image: rabbitmq:3.10
 rabbitmq:
   advancedConfig: |
     [
      {rabbit,
       [
        {vm_memory_high_watermark, 0.75},
        {disk_free_limit, {mem_relative, 1.0}}
       ]}
     ].

$ kubectl exec mybunny-server-2 -it -- cat /etc/rabbitmq/advanced.config
Defaulted container &quot;rabbitmq&quot; out of: rabbitmq, setup-container (init)
[
{rabbit,
 [
  {vm_memory_high_watermark, 0.75},
  {disk_free_limit, {mem_relative, 1.0}}
 ]}
].
</code></pre>
<p>The above loads fine, notice how I didnt enter the &quot;kernel&quot; feature in the advanced config</p>

Yamazaki Richard
<p>There are a few typos in <code>advancedConfig</code> your YAML file:</p>
<pre class="lang-yaml prettyprint-override"><code>     [
      {rabbit,
       [
        {vm_memory_high_watermark, 0.75},
        {disk_free_limit, {mem_relative, 1.0}}
       ]} # a comma (,) is missing here 
     [  # It shouldn't be here.  
      {kernel, []}, # No need to put comma after the last {} part. 
     ].
</code></pre>
<p>Fixed YAML:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: rabbitmq.com/v1beta1
kind: RabbitmqCluster
metadata:
 name: mybunny
spec:
 replicas: 3
 image: rabbitmq:3.10
 rabbitmq:
   advancedConfig: |
     [
      {rabbit,
       [
        {vm_memory_high_watermark, 0.75},
        {disk_free_limit, {mem_relative, 1.0}}
       ]},
      {kernel, []}
     ].
</code></pre>
<pre class="lang-bash prettyprint-override"><code>$ kubectl get RabbitmqCluster
NAME      ALLREPLICASREADY   RECONCILESUCCESS   AGE
mybunny   True               True               5m46s

$ kubectl get pods 
NAME                                                              READY   STATUS    RESTARTS   AGE
mybunny-server-0                                                  1/1     Running   0          6m34s
mybunny-server-1                                                  1/1     Running   0          6m34s
mybunny-server-2                                                  1/1     Running   0          6m34s
</code></pre>
