Optimization at the industry level is a fundamental area since it allows reducing costs and being more sustainable. Many of these problems are combinatorial and NP-hard. On the other hand, swarm intelligence metaheuristics have been able to successfully address these types of problems, however, many of these techniques work in searching continuous spaces. In this article, we explore a general binarization mechanism of continuous metaheuristics based on the k-means technique. In particular, we applied the k-means technique to the bat algorithm with the aim of addressing the set covering problem (SCP). Experiments were designed to evaluate the contribution of the k-means technique in the binarization process. In addition, we verify the effectiveness of our algorithm through reference instances. The results indicate that the k-means binary bat algorithm (KBBA) gets adequate results when evaluated with a combinatorial problem like SCP.