SummaryProviding a pool of various resources and services to customers on the Internet in exchanging money has made cloud computing as one of the most popular technologies. Management of the provided resources and services at the lowest cost and maximum profit is a crucial issue for cloud providers. Thus, cloud providers proceed to auto‐scale the computing resources according to the users' requests in order to minimize the operational costs. Therefore, the required time and costs to scale‐up and down computing resources are considered as one of the major limits of scaling which has made this issue an important challenge in cloud computing. In this paper, a new approach is proposed based on MAPE‐K loop to auto‐scale the resources for multilayered cloud applications. K‐nearest neighbor (K‐NN) algorithm is used to analyze and label virtual machines and statistical methods are used to make scaling decision. In addition, a resource allocation algorithm is proposed to allocate requests on the resources. Results of the simulation revealed that the proposed approach results in operational costs reduction, as well as improving the resource utilization, response time, and profit.