Cloud Computing is being used more and more to host and run service-based applications (SBAs). One of the main assets of this paradigm is its pay-per-use economic model. Likewise, Cloud Computing gets more attention from Information Technology stakeholders when it fits their required QoS. Unfortunately, This task cannot easily be done without increasing the autonomy of the provisioned cloud resources. Autonomic computing implies the usage of an Autonomic Manager (AM), which is composed of four basic components that monitor cloud resources, analyze monitoring data, plan and execute configuration actions on these resources. The key challenge in this regard is to optimally allocate cloud resources to autonomic SBAs so that the required QoS is met while reducing the consumption cost as per the economic model of Cloud computing. In fact, given cloud resources, diversity of SBAs services and AMs components QoS requirements, the allocation of cloud resources to an autonomic SBA may result in higher cost and/or lower QoS if resource allocation is not well addressed. In this paper, we propose an algorithm that aims to determine the best allocation decisions of AMs components that will be used to manage an SBA in the cloud such that the resources consumption cost is minimized while guaranteeing the QoS requirements. Experiments we conducted highlight the effectiveness and performance of our approach.