K8S - Memory requests and limits of RabbitmqCluster pods at a minimum of 500Mi - why?

117 views
Skip to first unread message

Rilind Harizaj

unread,
Aug 29, 2024, 5:34:14 AM8/29/24
to rabbitmq-users
Hello all,

I am currently trying to set up a three-node RabbitMQ Cluster in my local one node K8s Cluster provided by Docker Desktop. The version of the cluster is 1.25.

In this version, I am using the resource template below to generate a one node cluster for testing:


kind: RabbitmqCluster
metadata:
  name: testrabbit
  namespace: rabbitmq-system
spec:
  replicas: 1 # ein Cluster mit 3 Knoten
  persistence: # die Daten werden nicht persistiert, sollte dementsprechend angepasst werden
    storage: 0Gi
  resources: # die Ressourcen für jeden Pod.
    requests:
      cpu: 250m
      memory: 256Mi
    limits:
      cpu: 250m
      memory: 256Mi
  rabbitmq:
    additionalPlugins:
      - rabbitmq_stream
Despite my declared memory requests and limits, describing the node via kubectl yields the following resource limits for the one pod generated:
rabbitmq-system             testrabbit-server-0                          250m (4%)     250m (4%)   500Mi (26%)      500Mi (26%)    23m

Why is this the case? It would seem that each pod is allocated a minimum of 500Mi. Is there an opinionated setting that is overriding my set limits?

I am fairly new to both K8S and RabbitMQ, so any help would be appreciated.


Best,
Rilind

Michal Kuratczyk

unread,
Aug 29, 2024, 5:58:34 AM8/29/24
to rabbitm...@googlegroups.com
Looks like the init container has this hardcoded (your "rabbitmq" container should have the limits you set, it's just the init container that uses 500<B).
You can adjust it with:
```
  override:
    statefulSet:
      spec:
        template:
          spec:
            containers: []
            initContainers:
              - name: setup-container
                resources:
                  limits:
                    cpu: ...
                    memory: ...
                  requests:
                    cpu: ...
                    memory: ...
```

We should probably reduce this hardcoded value. I don't think it needs anything near 500MB. A PR to the cluster-operator (with some testing)
would be appreciated.

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/939d8bbb-d09f-467d-a678-af37bd663177n%40googlegroups.com.


--
Michal
RabbitMQ Team

This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.

Rilind Harizaj

unread,
Aug 29, 2024, 6:02:59 AM8/29/24
to rabbitmq-users
Hello,

I understand, thank you for the prompt response!

Best,
Rilind
Reply all
Reply to author
Forward
0 new messages