Kubernetes HiveMQ cluster fails to apply CPU cores specified in values.yaml

 Problem

The custom configuration of CPU core limits is not being applied to the HiveMQ cluster running in Kubernetes when using the HiveMQ operator.

 Solution

If you are experiencing issues with the CPU core limits not being applied to your HiveMQ cluster in Kubernetes while using the HiveMQ operator, there may be a configuration issue in your Kubernetes cluster setup. You can follow the steps below to troubleshoot and verify the configuration:

  1. Run the following commands inside the container and check if the output matches the expected CPU core count:

    kubectl apply -f pod.yaml kubectl logs debugging


    Once you have verified the CPU core count, you can remove the pod:

    kubectl delete pod --grace-period=0 --force debugging
  2. Check the value of the cgroupDriver used by your Kubernetes cluster to ensure it is correctly configured:

    kubectl describe node <node-name> | grep -i cgroupdriver

     This will help you confirm the set cgroupDriver and then you can verify if it allows to apply CPU limits.

  3. Double-check if there are any configurations in place that might be preventing the container from seeing any CFS (Completely Fair Scheduler) quota. Verify that options like --cpu-cfs-quota=false or similar are not configured. Such configurations are usually found in the worker node's file located at /etc/kubernetes/kubelet.conf.

  4. If you are using a security tool called "sysdig," please be aware that it can block the cgroup v2 interaction of a pod. This can result in the CPU limits specified in the HiveMQ operator values.yaml file not being applied.

By following these troubleshooting steps, you can identify and address any configuration issues that may be preventing the custom CPU core limits from being applied to your HiveMQ cluster in Kubernetes.



 Related articles